reflection - c# property override Set method -
i have class below, want override set value of "school,country..etc.." property when 1 sets value , don't want change student class need in base class , use generic method
public class student : baseclass { public string school { get; set; } public string country{ get; set; } }
ie: when 1 sets student.school="harvard"
, need store as
student.school="harvard custom value"
;
note: calling onpropertychanged in base class rather main class.
if want aspects, try postsharp
Comments
Post a Comment