|
-
Sep 2nd, 2008, 11:05 AM
#1
Re: [2005] Graphics Card Clocks & Temperature
Yes, but you never have to, and I've found both the code and the Intellitype easier if you don't and just assign how you want your output to be arranged before you assign it to your variable:
Code:
Dim pumps As List(Of PumpStruct) = (From pump As PumpStruct In ordOrder.Pumps _
Where pump.Status = 2 _
Select pump Order By pump.PrintOrder Ascending).ToList
Dim row As DataRow = (From r As DataRow In dt _
Where r.Item("ORDER_NO").Equals(od.OrderNumber) _
Select r).FirstOrDefault
When I said I don't see the point, what I mean is "I don't see the point of assigning an anonymous type to a variable". In order to use it, you have to do something with it; either: ToList, ToArray, FirstOrDefault, etc...
There may be some manipulations you can do with them though as anonymous types, perhaps with lambdas, but even the VB.NET structure for declaring lambdas is rigid:
Code:
Dim f As Func(Of Integer, Boolean) = Function(i As Integer) If(i > 5, True, False)
I can't declare an anonymous type within a lambda function. So I dunno...
Last edited by Jenner; Sep 2nd, 2008 at 11:13 AM.
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
|