G
Guest
I can't seem to figure this one out... I've searched MSDN and Goog, and made
my best guesses to no avail,, so help would be much appreciated!
public ref class T sealed
: public System::Collections::IEnumerable
, public System::Collections::Generic::IEnumerable<int>
{
// How to implement GetEnumerator() for both interfaces?
// Compiler complains that functions differ only in return type
// which I understand, but can't get the right syntax for explicit
// interface implementations...
};
Explicit interface implementations in .NET SDK show the following syntax:
private: virtual System::Collections::IEnumerator^
System.Collections.IEnumerable.GetEnumerator() sealed =
System::Collections::IEnumerable::GetEnumerator
{ /*function body*/ }
Note the 'dot' scope operator in specifying the method name - it causes a
syntax error when I compile. Changing it to :: the compiler says that's old
syntax. Removing it compiles fine if I don't try to implement the generic
IEnumerable too. Stumped!
Thanks, KH
my best guesses to no avail,, so help would be much appreciated!
public ref class T sealed
: public System::Collections::IEnumerable
, public System::Collections::Generic::IEnumerable<int>
{
// How to implement GetEnumerator() for both interfaces?
// Compiler complains that functions differ only in return type
// which I understand, but can't get the right syntax for explicit
// interface implementations...
};
Explicit interface implementations in .NET SDK show the following syntax:
private: virtual System::Collections::IEnumerator^
System.Collections.IEnumerable.GetEnumerator() sealed =
System::Collections::IEnumerable::GetEnumerator
{ /*function body*/ }
Note the 'dot' scope operator in specifying the method name - it causes a
syntax error when I compile. Changing it to :: the compiler says that's old
syntax. Removing it compiles fine if I don't try to implement the generic
IEnumerable too. Stumped!
Thanks, KH