简体   繁体   中英

How can write a C function in a C# code

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

How can I built this? How can i write unmanaged code in C#. Can someone explain with few lines code.

Thanks

You either have to build the C file into it's own DLL and then use P/Invoke in your C# code to call them or...

You could also try to port the C code to C# which would give you a completely managed codebase.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM