I have a list of items containing my own custom class:
List<MyClass> myList = new List<MyClass>();
MyClass consists of:
The list is populated via a linq query.
I check if the name is equal to the current page name and if so update the value cssClass. This will only happen with 1 out of approx 10 records.
I thought about iterating through the list with a for each, but can't update myList.cssClass as it is read only.
I therefore have 2 questions: 1) Is a foreach the right way of tackling this?; 2) How would I go about updating the list value?
Thanks in advance.
View Complete Post