Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8704029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:59:45+00:00 2026-06-13T02:59:45+00:00

I want to implement an interface from my C++/CLI dll in C#. But I

  • 0

I want to implement an interface from my C++/CLI dll in C#. But I am having issues with return value optimization in C++ I guess. Consider

// BVHTree.cpp:
public value struct Vector3
{
    float X, Y, Z;
};

public value struct TriangleWithNormal
{
    Vector3 A, B, C, Normal;
};

public interface class IBVHNode
{
    property TriangleWithNormal Triangle { TriangleWithNormal get(); } // among others
    property bool IsLeaf { bool get(); } // can implement this
};

// BVHNode.cs:
public class BVHNode : IBVHNode // Error: member TriangleWithNormal* IBVHNode.get_Triangle(TriangleWithNormal*) not implemented (sth. along those lines)
{
    public TriangleWithNormal Triangle { get { return new TriangleWithNormal(); } }
    public bool IsLeaf { get { return true; } }
}

It complains BVNode didn’t implement IBVHNode. My last resort would be to access it via a regular method or using unsafe mode like visual studio suggests:

public TriangleWithNormal* get_Triangle(TriangleWithNormal* t) 
{ 
    throw new NotImplementedException();
}

Is there any way to still implement it in property syntax (apart from making TriangleWithNormal a ref class…)?

Update 1 Seems to be that implementing a method TriangleWithNormal GetTriangle() fails for the same reasons. You can however use it like void GetTriangle(TriangleWithNormal%);.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T02:59:46+00:00Added an answer on June 13, 2026 at 2:59 am

    It turned out that the error was gone after I lived some build cycles with my void GetTriangle(TriangleWithNormal%); workaround. Be it a wonder or more likely a silent clean build, upon commenting in the errorneous property trying to reproduce the error condition one more time, it compiled out of the box.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Issue I want to implement TransparencyChecker Interface which would verify that from any exchange
I want my class to implement an interface, but I want to provide the
I want to implement a derived class that should also implement an interface, that
I have an interface that I want to implement in separate classes after doing
If I want to implement seek() to complete the SeekableIterator interface, should I internally
I have a nice interface, and I want to implement one member of it
I want implement in my software solution an VBA editor but in c# 3.0.
Hi I want to create a google maps like interface from very high resolution
Do you know a quick way to implement method(s) from an Interface to a
I want to implement interface like iphone sms: Now I have chat listview with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.