In VC++ we can use header files, but in VC# it's not possible. Is there any way to use the header file (.h file) in C#? I have defined some structures and #defines
in .h file.
How can I use all those structures & enums in a C# project and is it possible to integrate the C++ code in C#?
In .NET does not exist headers because all needed metadata is contained itself in referenced assembly.
And yes, you can integrate C++/C code by using a C++/CLI module. C++/CLI can do managed and unmanaged code together in an assembly. The C# can then use the C++ assembly almost as if it is C# code
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.