tags:

views:

106

answers:

2
+5  A: 

If performance is important to you, then you should avoid crossing the managed/unmanaged boundary "lots of times". Both C# and C++ can be high performance languages but the interop perf costs are not pleasant.

I suggest you write a C library (which could be implemented with C++ constructs as long as the methods are extern C) and call it from the C# code -once!- using P/Invoke. This library can party on your high performance data structure and return some useful information to the C# side.

Kate Gregory
That's an interesting idea. I can push a bit more of the C# code into the C part and minimize the calls that I make between them. Thanks!
Haywood Jablomey
A: 

You can use a pipe.

Behrooz