简体   繁体   中英

How to covert c# code into vb.net (Linq)?

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

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}

I have done language conversion using reflector in the past.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM