This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Why does SingleOrDefault throw a "Sequence contains an incorrect number of elements" instead of the more 'linq-default' version "The input sequence contains more than one element." ? It took me a few minutes to figure out that it meant more then one record was being returned by the query, mostly because normally L2S/L2O throws the "more then one element" error instead of "incorrect number of elements". |
|
|
I agree, the L2S/L2O message is clearer. I've changed the error message to the "more than one element" form (beginning with the 10 July nightly). Thanks for the feedback! |
|