C# program to check all items of a float array is greater than 5.0 using Linq
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
total answers (1)
Program:
The source code to check all items of a float array is greater than 5.0 using Linq, is given below. The given program is compiled and executed successfully on Microsoft Visual Studio.
Output:
Explanation:
In the above program, we created a LinqDemo that contains the Main() method. In the Main() method we created an array of float numbers.
The above code will return a boolean value, where we check all elements of the array are greater than 5.0 if any one of them is less than 5.0 then All() method will return false otherwise it will return true.