Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LINQ to datatable - how to create a variable?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01576896
Message ID:
01577627
Vues:
57
This message has been marked as a message which has helped to the initial question of the thread.
>
>The problem is to declare query variable separately and re-use it later.
>


You can't. It's anonymous which basically means you don't have access to the internally generated class name the compiler built for it. If you need access to it from other methods, it's no longer anonymous (basically, you have to declare a real class type which will hold the results and project the results into that instead of "new { }".
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform