C
christian2.schmidt
Hi,
why does the first Console::Write give error "indexer needs array or
pointer" and the second not?
generic <typename TList, typename ItemType> where TList :
IList<ItemType>
ref class MyClass
{
public:
MyClass() {}
void Method(TList list1)
{
Console::Write("{0}, ", list1[0]); // error C2109 ??
IList<ItemType>^ list2 = list1;
Console::Write("{0}, ", list2[0]); // ok
}
};
Cheers,
Christian
why does the first Console::Write give error "indexer needs array or
pointer" and the second not?
generic <typename TList, typename ItemType> where TList :
IList<ItemType>
ref class MyClass
{
public:
MyClass() {}
void Method(TList list1)
{
Console::Write("{0}, ", list1[0]); // error C2109 ??
IList<ItemType>^ list2 = list1;
Console::Write("{0}, ", list2[0]); // ok
}
};
Cheers,
Christian