Tuesday, May 31, 2022

How to insert records in array from data rows

 List<string> batch=new List<string>();

if(dt.Rows.Count >0)

{

    for(int i=0; i<dt.Rows.Count; i++)

    {

        batch.Add(dt.Rows[i].["BatchCode"].toString());//this is from database

    }

}


No comments:

Post a Comment