• Home
  • Privacy Policy
  • Terms & Conditions
  • Contact
  • Advertise
Videos, Photos, Wallpapers, Free Download, Movies, Songs, Sports , Live TV, Entertainment
 
  • Home
  • Bollywood
  • Hollywood
  • Box Office
  • Beauty
  • Fashion
  • Celebrity
  • Business
    • Social Media
    • Money Online
    • Category
  • Entertainment
    • Bollywood
  • Video
    • Youtube
    • Video
  • Technology
    • Asp.net
    • C#
    • SQL
    • .Net
Showing posts with label ArrayList. Show all posts
ArrayList arraylistcontainer=new ArrayList(3);
arraylistcontainer.Insert(0,"India");
arraylistcontainer.Insert(1,"USA");
arraylistcontainer.Insert(2,"Japan");


public DataSet ConvertArrayListToDataSet()
{
DataSet dsTemp = new DataSet();
DataTable Tables = new DataTable();
dsTemp.Tables.Add(Tables);

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

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

}
}
Older Posts Home

ASP.NET Examples

 
2012 24x7 Magazine. All rights reserved.
Designed by 24x7 Magazine