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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -