Generic List created at runtime
- by Perry
Hi... i neeed something like this in C#.. have list in class but decide what will be in list during runtime
class A
{
List data;
Type typeOfDataInList;
}
public void FillData(DataTyp[] data) where DataTyp : struct
{
A a = new A();
A.vListuBudouDataTypu = typeof(DataTyp);
A.data = new List();
A.AddRange(data);
}
Is this possible to do…