can anyone tell me how can I get maximum value but no infinite ?
result = arr.Cast
Help me please
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shweta LodhaPosted Dec 20, 2014, 3:01 AM
result = arr.Cast
.Where(i => !double.IsInfinity(i))
.Max();
similarly you can get Min also.
Shweta LodhaPosted Dec 20, 2014, 3:04 AM
HimhaPosted Dec 20, 2014, 3:03 AM
Your suggestion worked.