I have an IList and a ListBox.
I compare the items in IList and ListBox by a for loop.
if(they are equal)
remove from the IList.
I used Ilistobj.removeAt(loopNumber). // it throws error Collection was of a fixed size.
How to remove from that object.
I need that obj for someother purpose.
Loading
Subhendu DePosted Dec 28, 2010, 4:59 AM
IList
IList
_list1.Add("AAA");
_list1.Add("BBB");
_list1.Add("CCC");
_list1.Add("DDD");
_list1.Add("EEE");
for (int i = 0; i < ListBox1.Items.Count; i++)
{
if (ListBox1.Items[i].Value.Equals(_list1[i]))
{
_list2.Add(_list1[i]);
}
}
for (int i = 0; i < _list2.Count; i++)
{
Response.Write(_list2[i]);
}
Chandra Sekhar KPosted Dec 28, 2010, 5:27 AM
This idea helped.