You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
InvalidOperationException for some LINQ SingleOrDefault overloads is not documented #4469
@dmitrykorolevlighting commented that, "The version of SingleOrDefault() without a predicate throws InvalidOperationException when The input sequence contains more than one element.. The version with a predicate is doing the same, however it is not documented. Due to this, one can incorrectly assume that this method returns a default value not only when a sequence contains zero elements, but also when there were more that one elements that matched the condition."
Specifically, the SingleOrDefault overload that takes a predicate as an argument does not document InvalidOperationException for two types:
changed the title [-]InvalidOperationException for some LINQ SingleOrDefault() overloads is not documented [/-][+]InvalidOperationException for some LINQ SingleOrDefault overloads is not documented [/+]on Feb 22, 2018
Activity
[-]InvalidOperationException for some LINQ SingleOrDefault() overloads is not documented [/-][+]InvalidOperationException for some LINQ SingleOrDefault overloads is not documented [/+]