Say I have a C# interface called IMyInterface
defined as follows:
// C# code
public interface IMyInterface
{
void Foo(string value);
string MyProperty { get; }
}
Assume I also have a C++/CLI class, MyConcreteClass
, that implements this interface and whose header is declared as follows:
// C++/CLI header file
ref class MyConcreteClass : IMyInterface
{
public:
};
How does one implement the method Foo
and the property MyProperty
in the C++/CLI header?
My attempt results in the following compile error:
error C3766: 'MyConcreteClass' must provide an implementation for the interface method 'void IMyInterface::Foo(System::String^ value)'