如何将c#代码转换为vb.net(Linq)?

时间:2021-04-19 19:00:17

var result = from с in dal.context.Funds select new { Name = c.CODE Price = c.Price };

var result = from d in dal.context.Funds select new {Name = c.CODE Price = c.Price};

2 个解决方案

#1


I'm not a big VB user, but something like:

我不是一个很大的VB用户,但是:

Dim result = From c In dal.context.Funds _
                 Select c.CODE, c.Price

To rename it, you might need With (at a guess):

要重命名它,您可能需要With(猜测):

Select New With {.Name = c.CODE, .Price = c.Price}

#2


I have done language conversion using reflector in the past.

我过去使用反射器进行了语言转换。

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

这篇文章显示它可以帮助LINQ ...

#1


I'm not a big VB user, but something like:

我不是一个很大的VB用户,但是:

Dim result = From c In dal.context.Funds _
                 Select c.CODE, c.Price

To rename it, you might need With (at a guess):

要重命名它,您可能需要With(猜测):

Select New With {.Name = c.CODE, .Price = c.Price}

#2


I have done language conversion using reflector in the past.

我过去使用反射器进行了语言转换。

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

这篇文章显示它可以帮助LINQ ...