Compiling C code for .NET [closed]
H开发者_StackOverflow社区ow can I compile C code for use in .NET?
There is a game that written in C; how can I convert it to .Net code or use some parts of it?
You can't use C code directly within .NET.
You have a couple of options:
Compile the C code into a dynamic link library, and use P/Invoke in order to call it from your .NET program.
Port the C code to .NET.
Wrap the C code using C++/CLI (making a mixed mode assembly), and use these from within your other .NET language of choice.
精彩评论