G
Guest
I tried but failed to implement a template class that support IEnumerator<T>
interface using C++/CLI in VS 2005 Professional version. I could not figure
out the proper syntax to implement the property "Current". The challange is
that I need to implement two versions of the property: one of type
System::Object as required by Collections::IEnumerator, the other of type T^
as required by Collections::Generic::IEnumerator<T>
template<typename T>
class A : IEnumerator<T^>
{
property System.Object^ Current {...}
property T^ Current {...}
};
the article "Explicit Override of an Interface Member" in MSDN did not help
much. Any helps are greatly appreciated.
interface using C++/CLI in VS 2005 Professional version. I could not figure
out the proper syntax to implement the property "Current". The challange is
that I need to implement two versions of the property: one of type
System::Object as required by Collections::IEnumerator, the other of type T^
as required by Collections::Generic::IEnumerator<T>
template<typename T>
class A : IEnumerator<T^>
{
property System.Object^ Current {...}
property T^ Current {...}
};
the article "Explicit Override of an Interface Member" in MSDN did not help
much. Any helps are greatly appreciated.