Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to write a C# wrapper class??

Status
Not open for further replies.

Bartec

Programmer
Jan 21, 2005
54
0
0
PL
Hi!

I need to use C++ classes in my C# application. Which is the best way to do this?
1)Should I write dll then import this to the C# app?
2)I heard that I should write C++ managed code then in this include my unmanaged C++ code..smth like this

C# -----> (C++ managed->unmanaged C++)

What do you sugest? What is the best way to write what I want?
Thanks for any help

Best regards
Bartec


 
I would recommend #2. It'll be much easier to write a managed C++ wrapper around your unmanaged C++ code, as you can do some things in C++ that would be awkward in C#. Once you have the managed wrapper, you can call it from C#, VB.NET, or any other managed language.

Chip H.


____________________________________________________________________
Donate to Katrina relief:
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top