|
-
Sep 28th, 2010, 01:42 AM
#6
Re: How to pass the result of the linq to textbox?
Hey,
I am by no means an expert on LINQ, I have been meaning to read a book on it, but just haven't got round to it.
Having said that, I think the reason that you are seeing this is due to the inferred type of q, following each query. In the first LINQ query, you are returning a number of different rows, in which case, the inferred type has the CopyToDataTable() method. However, in the second, you are no longer returning a number of different rows from the query, instead, you are returning a new instance of a class, in which case, there isn't the CopyToDataTable() method.
If you run the debugger, and set a watch on q, in both cases, you should hopefully see what I mean.
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|