Your code worked for me as soon as I fixed a couple of minor syntax errors ( ; after class declarations in C ++ / CLI, skipping the word bool as the returned type of IsLeaf.get() ) and defined the type Vector3,
I figured out how you defined Vector3, this is not a standard class that I'm familiar with. Where is this defined? Is it a managed class, a managed structure, or an unmanaged? (I defined it as public value struct Vector3 { double x, y, z; }; for my test.)
As I said, there are minor syntax errors in the C ++ / CLI code that you posted here. These two errors give very clear compilation errors, so I assume these are typos in transcription from Visual Studio on the Internet. Are there any other changes between what you posted and the actual code?
Also, I was not able to get the error message that you reported, member TriangleWithNormal* IBVHNode.get_Triangle(TriangleWithNormal*) not implemented . I always get compilation error CS0535: 'CSharpTest.BVHNode' does not implement interface member 'CppCLITest.IBVHNode.Triangle' .
The property you showed does not accept a parameter, but a compiler error shows the get_Triangle method, which accepts a parameter of type TriangleWithNormal* . Do you have another property declaration somewhere or an explicit declaration of this method?
I think that is possible. If I try to declare a C ++ / CLI property as an indexed property, then I get a method signature similar to what you see.
In your actual code, you have something like this:
property TriangleWithNormal Triangle[TriangleWithNormal] { TriangleWithNormal get(TriangleWithNormal input); }
This is an indexed property that C # does not allow to implement. (C # allows one indexed property, this[] , but only one.)
When I try to implement this in C #, I need to explicitly implement the property support method, and not implement it as a C # property.
public TriangleWithNormal get_Triangle(TriangleWithNormal input) { return new TriangleWithNormal(); }
Make the indexed property regular, and this should work for you.