Override a Property with a Derived Type and Same Name C#

前端 未结 5 920
臣服心动
臣服心动 2020-12-29 11:21

I\'m trying to override a property in a base class with a different, but derived type with the same name. I think its possible by covarience or generics but am not sure how

5条回答
  •  臣服心动
    2020-12-29 11:21

    If SunData is assignment compatible with Outerspace Data (inherits from) then you don't need to modify the type of of OuterSpaceData

提交回复
热议问题