You question is confusing.
First you said you want to convert data table to generic list and now you are saying that you dot want to use generic?
For generic list, you need to use generics.
Please clear you question before posting.
Solution using Generic List:-
1. You need to create a class file with properties matching with you table columns. E.g. MyType
2. Get the data from SQL and fill to Data-table. E.g. table
3. Fill the generic List with the Data-table values.
List<MyType> data = new List<MyType>(table.Rows.Count);
foreach (DataRow row in table.Rows)
{
data.Add(new MyType((int)row[0], (string)row[1])); //Create MyType class object and add the data to properties form table rows.
}
4. Your job is done.
Emil, if this helps please login to Mark As Answer. | Alert Moderator