Collection: All

CSharp · Console

/Program.cs

using System;
using System.Linq;
					
public class Program
{
	public static void Main()
	{
		var scores = new[] { 87, 56, 33, 20, 11 };

		var all = scores.All(i => i > 0); // check if all values are greater than zero
		
		Console.WriteLine(all); 
	}
}
;