Użytkownik "Hasani (remove nospam from address)"
<hb********@n0sp4m.popstick.com> napisał w wiadomości
news:eX**************@tk2msftngp13.phx.gbl...
Assuming the class that contains that property derives from a class called
Bar.
[System::Reflection::DefaultMember(S"Item")]
public __gc class Bar
{
public:
__property Bar* get_Item(int index)
{
return NULL;
}
};
public __gc class Foo : public Bar
{
public:
__property Bar* get_Item(int index)
{
return Bar::get_Item(index);
}
};
Yes, but this one problem:
public __gc class Bar
{
public:
__property Object* get_Item(int index)
{
return NULL;
}
};
public __gc class Foo : public Bar
{
public:
__property Bar* get_Item(int index) //Error C2392 covariant returns types
are not supported in managed types
{
return Bar::get_Item(index);
}
};
Exactly:
public __gc class Foo : public ArrayList
{
public:
__property Bar* get_Item(int index) //Error C2392 covariant returns types
are not supported in managed types
{
return Bar::get_Item(index);
}
};