How can I convert below code to vb.net?
I can not convert select new { c.CustomerID, OrderCount = c.Orders.Count() };
public void Linq76()
{
List<Customer> customers = GetCustomerList();
var orderCounts =
from c in customers
select new { c.CustomerID, OrderCount = c.Orders.Count() };
ObjectDumper.Write(orderCounts);
}
That’s C#’s anonymous classes. VB has support for that too. See this example.
For basic info on using LINQ in VB: try this resource.