C++/CLI property override

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I override property in C++/CLI. Well I know how to override when the
input and output types are the same (and number) ..., but I would like the
derived (overridden) property to return different type than base.

Thanks
 
Skrat said:
How can I override property in C++/CLI. Well I know how to override when
the input and output types are the same (and number) ..., but I would
like the derived (overridden) property to return different type than base.

An override for managed functions always requires the same arguments and
return type. The only way to accomplish what you want is to introduce a new
property with the same name (using the 'new' keyword). You'll have to put
the new keyword on the get and set functions.
 
Back
Top