Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Populate a Dictionary
Message
 
À
22/03/2011 11:32:28
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01504070
Message ID:
01504626
Vues:
45
>
>
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 ?

>
>Pete, it was available in VS2008 also. You probably don't have the proper using: using System.Linq;

That was it - haven't got my head around extensions yet - thanks Bonnie
Regards,
Peter J. Kane



Pete
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform