Karatas, FERHAT
I would love to change the world, but they won't give me the source code!
Check if a object already exists in arraylist
10.7.2008 10:50:44 - Filed under : C#
DataView dv = new DataView(dt, "oyverdimi is null", "altkategoriID Asc", DataViewRowState.CurrentRows);
           
ArrayList arr = new ArrayList();
            
for (int i = 0; i < dv.Count; i++)
{
    if (!arr.Contains(dv[i]["KategoriAdi"].ToString()))
    {
          arr.Add(dv[i]["KategoriAdi"].ToString());
    }
}

Keywords : Arraylist, contains, add unique item to arraylist.
with 0 comments

What do you think ?
Security Code 9591
Check S. Code
Name  
Email  
Home Page  
Comments