Anzurio
Anzurio

Reputation: 17014

How to explicitly/implicitly implemented interface members in C++/CLI?

What's the equivalent in C++/CLI of this:

class Explicit : IClonable
{
    void IClonable.Clone()
    {
    }
}

class Implicit : IClonable
{
    public void Clone()
    {
    }
}

Upvotes: 2

Views: 2061

Answers (1)

Ben Voigt
Ben Voigt

Reputation: 283624

As nobugz says, you can't explicitly implement IDisposable.

So, assuming that the title of your question is accurate, and you want to have explicit implementation of interface members (or explicit overrides which are supported in C++/CLI but I don't think are possible in C#, C++/CLI also provides more flexibility to override multiple v-table slots with the same function), see:

http://msdn.microsoft.com/en-us/library/fw0bbh51.aspx

Upvotes: 3

Related Questions