0

I was wondering what the best to choose is. Let's say I want to use C++ functions from C#. In most of the cases Platform Invoke will do the job fairly simple. The problem is that I want to wrap functions that are critical (used many times a second) i.e. OpenGL draw calls. This implies that there would be latency and loss in performance due to the intermediate layer. Then I found about CLI which is basically managed C++. I thought it would be faster, but since PInvoke is a technology improved for years, it be better.

What is actually the best performance-wise solution to use C++ functionality in C#/.Net

Edit: What are the pros and cons of both?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Sup3rlum
  • 51
  • 7

0 Answers0