I don't want to convert my c project to dll file.
You might not want to do that, but it's the only way. The most common solutions to your problem are:
- Compile C code into unmanaged DLL and call it using p/invoke.
- Compile C code into a COM server and use COM interop.
- Wrap the C code in a C++/CLI mixed mode assembly which you can add to the C# project as a reference.