Author: asusudev@live.com | Posted on: 11/23/2009 8:54:23 PM | Views : 484

Hello everybody,
I have had an original SortedList, then I want to change Item's value, but I cannot do it, please give me some advices.
Thank you. 
Here's my codes:
//Create an original SortedList System.Collections.SortedList ExamScoresSL = new System.Collections.SortedList(); ExamScoresSL.Add("Judy", 87.8); ExamScoresSL.Add("John", 90.5); ExamScoresSL.Add("Sally", 100); ExamScoresSL.Add("West", 78.9); ExamScoresSL.Add("Alex", 90.5); //Change the first value IList ScoresIL = ExamScoresSL.GetValueList(); ScoresIL[0] = (Double)ScoresIL[0] + 100.5; And the Error message:
This operation is not supported on SortedList nested types because they require modifying the original SortedList.

...

Go to the complete details ...