Implement a generic C++/CLI interface in a C# generic interface

Posted by Florent on Stack Overflow See other posts from Stack Overflow or by Florent
Published on 2013-11-08T08:41:19Z Indexed on 2013/11/08 9:54 UTC
Read the original article Hit count: 328

Filed under:
|
|

I have a C++/CLI generic interface like this :

using namespace System::Collections::Generic;
namespace Test
{
    generic <class T>
    public interface class IElementList
    {
         property List<T>^ Elements;
    };
}

and I want to implement it in a C# generic interface like this :

using Test;
namespace U
{
    public interface IElementLightList<T> : IElementList<T>
        where T : IElementLight
    {
        bool isFrozen();
        bool isPastable();
    }
}

This don't work, Visual Studio is not able to see C++/CLI IElementList interface ! I tested with a not generic C++/CLI interface and this work.

What I missed ?

© Stack Overflow or respective owner

Related posts about c#

Related posts about interface