Using Smart CLR Property as object repository

4 בDecember 2016

the next scenario can be Simple, yet during development it is hard to change design so tricks like that can be awesome. Consider the following entity. public class Cat { public string Name; } public class Dog { public string Name; } class Wrapper { public bool isDog; private Dog dog = new Dog() {Name = "Snoopi" }; private Cat cat = new Cat() {Name = "Tom" }; public string Name { get { ...