I'm trying to convert this c# code into c++/cli code:
class MyRange : IEnumerable<int>
{
public IEnumerator<int> GetEnumerator() { return null; }
IEnumerator IEnumerable.GetEnumerator() { return null; }
}
Here is my attempt:
namespace Tests {
public ref class MyRange : System::Collections::Generic::IEnumerable<int> {
private:
virtual System::Collections::IEnumerator^ GetEnumerator() = System::Collections::IEnumerable::GetEnumerator {
return nullptr;
}
virtual System::Collections::Generic::IEnumerable<int>^ GetEnumerator() {
return nullptr;
}
};
}
It's giving me so many errors (like 20), that I don't even think it's worth putting them here.
I've googled it all and it seems like a lot of people are having the same problem as me.