c# - Single property for inhertance hierarchy -


i have property returns result, how can write property such result remains same derived classes. have tried

  // in base class   // gives new object everytime public virtual result propertyx=> new result();  public virtual result propertyx { // returns new object classes derived derived class  // of base class( grand child class may be!!!)  get{ return result?? new result();}  set{ resultfield=value;}  } 

supposing hierachy base- derived1- grandchild1

when derived class intantiated result property set, problem is, when grandchild instantiated result intantiated again, want check if result set, if result set should reused.


Comments

Popular posts from this blog

minify - Minimizing css files -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -