I've created a little demo for myself to practice combining C++ & C# (a very desirable skill for me).
It looks like this:
The issue arises from the fact that the class Person
has a member of type Name
.
What would be the correct way to expose these classes to C#?
For example how would I expose this constructor:
Person(Name name);
It's kind of hard to explain but the issue is that this Person
constructor accepts a Name
object which is native, and I can't create this native object in C# and just pass it in the constructor, right? It wouldn't even be desirable.
And even if I write a wrapper for it (say ManagedName
) I can't pass it to Person
since there's no acceptable constructor.
How should I cope with this situation?
Here are the headers as requested:
Nullable: http://pastebin.com/z7zTCrAq
Name: http://pastebin.com/ALNp5c1a
Person: http://pastebin.com/nkWyUv9C