You can do it such as following code:
1 public static DataSet dsSearch()
2 {
3
4 DataTable dtTelcoCenter = new DataTable();
5 dtTelcoCenter.Columns.Add("Id", typeof(int));
6 dtTelcoCenter.Columns.Add("City", typeof(string));
7 dtTelcoCenter.Columns.Add("Capacity", typeof(int));
8
9 IList<Telco> telcoCenter = Search(centerName, Prefix);// Search method return a list
10
11
12 foreach (Telco telco in telcoCenter)
13 {
14 DataRow rowTelcoCenter = dtTelcoCenter.NewRow();
15 rowTelcoCenter["Id"] = telco.Id;
16 rowTelcoCenter["City"] = telco.City;
17 rowTelcoCenter["Capacity"] = telco.Capacity;
18 dtTelcoCenter.Rows.Add(rowTelcoCenter);
19 }
20 DataSet dsTelcoCenter = new DataSet();
21 dsTelcoCenter.Tables.Add(dtTelcoCenter);
22 return dsTelcoCenter;
23 }