Is it possible to embed C code in a C# project?

前端 未结 4 907
攒了一身酷
攒了一身酷 2020-12-07 01:43

I know that it\'s possible to compile my C code into a dll, and then use P/Invoke to call that code.

What I wondered if it was possible to have a chunk of C code emb

4条回答
  •  忘掉有多难
    2020-12-07 01:59

    It's not possible. While C# supports unsafe code (pointers), it is not backwards compatible with C or C++

提交回复
热议问题