var result = from с in dal.context.Funds select new { Name = c.CODE Price = c.Price };
+1
A:
I'm not a big VB user, but something like:
Dim result = From c In dal.context.Funds _
Select c.CODE, c.Price
To rename it, you might need With
(at a guess):
Select New With {.Name = c.CODE, .Price = c.Price}
Marc Gravell
2009-01-08 08:47:24
Care to qualify that downvote?
Marc Gravell
2009-01-08 08:50:02
maybe because you have plenty of points :) ... downvote should always follow a comment in my opinion :/
balexandre
2009-01-08 08:52:39
Thanks it was helpfull, I'm new here, and I'm not registered yet, As a I will done I'l voteAlso if I want to rename column name to smth like this "Name with spaces"?
2009-01-08 09:07:30
I'm pretty sure that VB won't let you do that (the naming thing). Very odd about the downvote - I know it wasn't you, since (as you say) not enough rep to vote yet! I must have annoyed somebody in the past... gotta love vendetta voting. Never mind ;-p If it fixes the problem, click the tick ;-p
Marc Gravell
2009-01-08 09:14:18
Actually the naming works fine :)
Leandro López
2009-01-10 13:05:50