Click here to Skip to main content
16,006,531 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone

Is there any way to convert the C# function to dll so that is can be used by a C++ program?

Thank you

zheng
Posted
Comments
Sandeep Mewara 8-Jul-10 2:12am    
Update from OP: have created a C# function. I wan to it to be called by another program created using c++. i have heard to convert the C# function into dll? Is it good to do it this way?

1 solution

Well, the reason most people ask this is b/c they are copying code off the web. Do you have a decent reason for doing this ? Your dll will need .NET, so the easiest way is to make your C++ code use C++/CLI and just use .NET to run code in the dll. Your other option is to create a COM dll and call that from your C++ code, but again, you'll still be adding .NET as a dependancy.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900