sawbona / morelinq

Automatically exported from code.google.com/p/morelinq
Apache License 2.0
0 stars 0 forks source link

Usage example for SingleOrFallback #85

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Could you please post a usage example on the documentation of SingleOrFallback 
extension method?

https://code.google.com/p/morelinq/source/browse/MoreLinq/SingleOrFallback.cs

Just tought it would be nice, I sometimes get lost with lambda expressions :S

Original issue reported on code.google.com by ajdvoy...@gmail.com on 21 Aug 2013 at 5:40

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 21 Aug 2013 at 6:12

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 21 Aug 2013 at 6:13

GoogleCodeExporter commented 9 years ago
<example>
<code>
int[] numbers = { 123, 456, 789 };
var result = numbers.Where(x => x == 100).SingleOrFallback(() => {return -1;});
</code>
</example>

Original comment by ajdvoy...@gmail.com on 7 Oct 2013 at 6:54

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 8 Oct 2013 at 8:59

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 8 Oct 2013 at 8:59

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 03f7d8ab05d9.

Original comment by azizatif on 8 Oct 2013 at 9:01

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 12fcffc7dc51.

Original comment by azizatif on 12 Aug 2014 at 10:18