LinqGen icon indicating copy to clipboard operation
LinqGen copied to clipboard

Add FirstOrDefault() with a predicate (merged Where and FirstOrDefault())

Open FredTunaB opened this issue 2 years ago • 2 comments

So we could do this: int val = list.Gen().FirstOrDefault(/*predicate*/)

insead of

int val = list.Gen().Where(/*predicate/*).FirstOrDefault()

FredTunaB avatar Jul 25 '23 18:07 FredTunaB

but i use list.Gen().FirstOrDefault(/predicate/) fail, always to use int val = list.Gen().Where(/predicate/).FirstOrDefault().... why??

donitry avatar Sep 27 '23 09:09 donitry

when can use "TakeWhile" ???

donitry avatar Sep 27 '23 09:09 donitry