Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting properties in Generic list
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 5.0
OS:
Windows 7
Network:
SAMBA Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01610922
Message ID:
01610925
Views:
36
>Hi All, is it possible in a "Linq type way" to set properties of class instances which are in a IList ? , for example I have a list of names and addresses in a list and if there are some that share a certain residential area code (e.g. UK ) I would like to set a property in the instances, hope this makes sense.

Closest you can get is probably something like:
foreach(Info i in list.Where(x=>x.Postcode.StartsWith="HR"))
            {
                i.SomeProperty = true;
            }
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform