LinqGen
LinqGen copied to clipboard
Add FirstOrDefault() with a predicate (merged Where and FirstOrDefault())
So we could do this:
int val = list.Gen().FirstOrDefault(/*predicate*/)
insead of
int val = list.Gen().Where(/*predicate/*).FirstOrDefault()
but i use list.Gen().FirstOrDefault(/predicate/) fail, always to use int val = list.Gen().Where(/predicate/).FirstOrDefault().... why??
when can use "TakeWhile" ???