Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# max sequence contains no elements

return collection.Any() ? collection.Max(c => c.Value) : 0;
// Or replace 0 with null or whatever other default 
// value you'd like to return.
 
PREVIOUS NEXT
Tagged: #max #sequence #elements
ADD COMMENT
Topic
Name
1+1 =