How To Convert ArrayList To DataSet

How to convert an arraylist to dataset or datatable so that I can filter or make a select distinct from it or Bind it to Gridview.
public DataSet ConvertArrayListToDataSet()
       DataSet dsTemp = new DataSet();
       DataTable Tables = new DataTable();

       dsTemp.Tables[0].Columns.Add("val", System.Type.GetType(

       foreach (string str in arraylistcontainer)
           if (str != string.Empty)
               DataRow myRow = dsTemp.Tables[0].NewRow();
               myRow[0] = str;


No comments:

Post a Comment