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 instance, will recognize that the only IEnumerable<T>
it has in those namespaces is from System::Collections::Generic
. Why can't the C++/CLI compiler do the same? Unlesss I type its full name or at least Generic::IEnumerable<int>
, it won't recognize it and will fire a C2872 error: ambiguous symbol.
Am I missing something here?
Thanks