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.
IList Remove
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Subhendu DeRank #1,108 · 1.7K reputationPosted Dec 27, 2010, 11:59 PM EST
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 K160 reputationPosted Dec 28, 2010, 12:27 AM EST
This idea helped.