Reputation:
I have a C code and I want to use this in C#.
Is there a possibillity except rewriting this code?
Upvotes: 3
Views: 3306
Reputation: 91
Here i got a great tool ,SWIG , can do that. which support a lot of different language, include C# and java.
Upvotes: 0
Reputation: 1501033
Build the C code as a DLL, and then use "P/Invoke" to call it. You'll need to learn a bit about interop, which is an area I don't know very much about, I'm afraid – but here are a few links:
Upvotes: 7