views:

196

answers:

2

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
Care to qualify that downvote?
Marc Gravell
maybe because you have plenty of points :) ... downvote should always follow a comment in my opinion :/
balexandre
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"?
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
Actually the naming works fine :)
Leandro López
A: 

I have done language conversion using reflector in the past.

This post shows it can help with LINQ as well...

Dror