Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Casting Blues
Message
General information
Forum:
ASP.NET
Category:
LINQ
Title:
Environment versions
Environment:
VB 9.0
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01628033
Message ID:
01628054
Views:
37
Thanks. I've got it running now.

>>
>>var openInvoices = (List < D010Invoices.Invoice > )D010Invoices.invoices.Select(i => i.paid == false).;
>>
>>
>>if D010Invoices.invoices is a List of D010Invoice.Invoice why can't openInvoices be cast to it?
>
>The linq is going to return a Boolean IEnumerable. Use:
D010Invoices.invoices.Where(i => i.paid == false);
That will give you an IEnumerable of Invoices. If you need a List then tack on the .ToList() as Craig suggested.
>
>Tip: If you are using var then omit the cast and hover over 'var' - that will show the type which the linq would return.

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Reply
Map
View

Click here to load this message in the networking platform