Hi,
I have the following code running in a
results.ForEach(
delegate(string s)
{
s = s.Replace("¬", messageNumber.ToString());
}
);
Results is a generic List<>
After the ForEach has executed, the elements of the results List<> have
not changed, I have to do this:
int index = 0;
results.ForEach(
delegate(string s)
{
results[index] = s.Replace("¬", messageNumber.ToString());
index++;
}
);
Can anyone explain to me why this is?
Cheers
Paul
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com