c# - Assign to base class part of the object only -
when class d derived class b, how assign b part of only?
in c++, do:
d d; b b; d.b::operator = (b); what c# equivalent of this?
if
class b {} class d : b {} then d is b added functionality. there no 'part' of b, is b.
so not possible in such direct way trying do. you'd have implement function in d yourself, such void merge(b b) assigns fields b object's (d) relevant base fields.
Comments
Post a Comment