Here is my code:
using namespace System;
using namespace System::Collections;
using namespace System::Collections::Generic;
namespace Tests {
ref class MyCollection : public IEnumerable<int> <----HERE!
The C # compiler, for example, recognizes that only IEnumerable<T>it has from in these namespaces System::Collections::Generic. Why can't the C ++ / CLI compiler do the same? Otherwise, I type in his full name or, at least Generic::IEnumerable<int>, he will not recognize it and will cause error C2872: ambiguous character.
Did I miss something?
source
share