What you do only works with heterogeneous lists.
List<T> is a homogeneous list of type T , that is, all elements must be of type T Since Option<bool> and Option<int> have no common ancestor other than object , you cannot do this unless you use List<object> or the old ArrayList , both of which act as dissimilar lists.
Think about how to extract objects from this list:
list.Add(TestBool); list.Add(TestInt); for(int i = 0; i < list.Count; i++) { list[i].Value
source share