Linq Query:
//all
int[] intNumbers = { 1, 2, 3, 55, 99, 74, 102 };
bool blnLessThan200 = intNumbers.All(n => n <= 200);
Console.WriteLine(blnLessThan200);
//
Output: TrueIt will simply check if all the elements in array are less than 200.
0 comments:
Post a Comment