Hi,
I am learning generics. I tried to include some elements this way.
This works.
Now actually i want different types of data to be included
I want to include empno integer,empname string, dateofjoining date, salary double all these in a generic arraylist.
How should I do that, i.e. passing different datatypes in a single generic arraylist.
Kindly help
Regards
cmrhema
I am learning generics. I tried to include some elements this way.
Code:
List<int> list = new List<int>(); for (int i=0; i<10; i++) { list.Add(i); }
Now actually i want different types of data to be included
I want to include empno integer,empname string, dateofjoining date, salary double all these in a generic arraylist.
How should I do that, i.e. passing different datatypes in a single generic arraylist.
Kindly help
Regards
cmrhema
Comment