Generic list of generic objects
Yes, generics is a good choice. The key to achieving type-safety (and being identify the type with the Type property is to add an abstraction between the list and Field<T> class. Have Field<T> implement the interface IField. This interface doesn’t need any members. Then declare your list as being List<IField>. That way you constrain the … Read more