C# Interface with C/C++ Logic

Can I build a C# GUI while implementing the main application logic in C or C++? How can these technologies be integrated efficiently?

i’ve used a c++/cli bridge before which worked fine. p/invoke is ok but can be trickier for larger projects. using a native dll can help streamline things. careful with interop layers tho, cause they might add overhead in complex apps.

hey i mcurious bout c++/cli wrappers for this, as they let you bridge efficiently betwen c# and native c++ code. have anyone tried combining with p/invoke or others? i wonder how the perf compares in different scenarios.