How to write a C function in C # code

I want to add a C file to my .NET application.

How can I build this? How can I write unmanaged code in C #. Can someone explain with a few lines of code.

thank

+3
source share
1 answer

You either need to assemble the C file into your own DLL, and then use P / Invoke in your C # code to call them or ...

You can also try porting C code to C #, which will give you a fully managed code base.

+10
source

Source: https://habr.com/ru/post/1768410/


All Articles