Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Casting Blues
Message
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Titre:
Versions des environnements
Environment:
VB 9.0
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01628033
Message ID:
01628054
Vues:
36
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform