I suggest creating a type like
enum ItemType { Int, String, Textbox } class MyType { public object objValue; public ItemType itemType; } List<MyType> list = new List<MyType>(); .......
You can iterate over the list or retrieve the list by type, for example, below.
var intList = list.Where(e=>e.itemType == ItemType.Int);
Of course, you can achieve the above with an enumeration and use the reflected type information directly from the object, but I just think it is more understandable, so I explicitly list the type that your list can contain, and not just the entire type in the CLR
source share