B
Bern McCarty
I'm trying to use the VS 2005 March Tech Preview and am trying to adjust
some MC++ to the new C++/CLI syntax. I got a little hung up when I
encountered the below error. Certainly my 'Bentley::Mstn::Element' type
derives ultimately from System::Object. It is a ref class. And upcasting is
always implicit right? So I don't understand why I'm getting this error.
It's happening on my get method:
property Bentley::Mstn::Element^ Item[]
{
Bentley::Mstn::Element^ get(int index);
void set (int index, Bentley::Mstn::Element^ value);
}
And here is the error
C:\mycode\elementWhidbey\ElementList.Mstn.Bentley.h(97) : error C2553:
'Bentley::Mstn::Element ^Bentley::Mstn::ElementList::Item::get(int)':
overriding virtual function return type differs from 'System::Object
^System::Collections::IList::get_Item(int)'
mscorlib.dll : see declaration of 'System::Collections::IList::get_Item'
some MC++ to the new C++/CLI syntax. I got a little hung up when I
encountered the below error. Certainly my 'Bentley::Mstn::Element' type
derives ultimately from System::Object. It is a ref class. And upcasting is
always implicit right? So I don't understand why I'm getting this error.
It's happening on my get method:
property Bentley::Mstn::Element^ Item[]
{
Bentley::Mstn::Element^ get(int index);
void set (int index, Bentley::Mstn::Element^ value);
}
And here is the error
C:\mycode\elementWhidbey\ElementList.Mstn.Bentley.h(97) : error C2553:
'Bentley::Mstn::Element ^Bentley::Mstn::ElementList::Item::get(int)':
overriding virtual function return type differs from 'System::Object
^System::Collections::IList::get_Item(int)'
mscorlib.dll : see declaration of 'System::Collections::IList::get_Item'