Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Test For Null
Message
De
04/06/2010 14:38:01
 
 
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Titre:
Divers
Thread ID:
01467359
Message ID:
01467384
Vues:
31
>>>>>>RetVal = items.Count==0 ? null : items[0];
>>>>>
>>>>>It's failing on this line:
>>>>>
>>>>>List<RuleAction> items = query.ToList();
>>>>>
>>>>Oh. I thought you said the last line :-}
>>>>IAC, that seems odd. I just tested with a query with would have no matches and query.ToList() returned an empty List.....
>>>
>>>What does <RuleAction> mean in this syntax List<RuleAction> Is it some type?
>>
>>A generic list. ie. a list that only contains objects of type RuleAction.....
>
>I was just thinking (and I may be completely wrong) could the problem be related with this type?

If the list was of the wrong type it would generate a compile time error.....
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform