Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LINQ to datatable - how to create a variable?
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01576896
Message ID:
01577627
Views:
58
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform