Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Populate a Dictionary
Message
 
To
18/03/2011 11:36:15
General information
Forum:
ASP.NET
Category:
LINQ
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01504070
Message ID:
01504483
Views:
38
>Try the following:
>
Dictionary<string, string> MyDictionary = ds.Tables[0].AsEnumerable().ToDictionary(dr => dr["KeyName"].ToString(), dr => dr["KeyValue"].ToString());
Hi Rob, I don't see ToDictionary() in intellisense - is it a VS2010 thing ?
Regards,
Peter J. Kane



Pete
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform