1

How do I make use of the .NET framework namespaces from C++?

  • learn to provide more information when you post a question... Contacting emergency services with just 'help! I am in trouble' is just a waste of time. What is your specific problem? Do you want to use a managed type/class in managed C++ or unmanaged C++ ? – Gishu Apr 10 '09 at 05:32
  • Bah, there is nothing wrong with this. The question is pretty obvious. He wants to reference .NET namespaces from Visual C++. – BobbyShaftoe Apr 10 '09 at 05:41
  • Clean up text and tags (not a C# question at all) – Richard Apr 10 '09 at 09:42

3 Answers3

5

C# will be

using System;

using System.Configuration;

C++ will be

using namespace System;

using namespace System::Configuration;

Don't forget to reference the libraries in your C++ project properties.

Stu
  • 15,675
  • 4
  • 43
  • 74
user88637
  • 11,790
  • 9
  • 37
  • 36
3

You can do this in managed C++. Use #using directive and use the namespaces like you normally do.

Naveen
  • 74,600
  • 47
  • 176
  • 233
1

Start Here: Pure C++: Hello, C++/CLI

Richard
  • 106,783
  • 21
  • 203
  • 265
JP Alioto
  • 44,864
  • 6
  • 88
  • 112