Where simple - method syntax

CSharp · Console

/Program.cs

using System;
using System.Linq;
					
public class Program
{
	public static void Main()
	{
		int[] numbers = { 40, 10, 24, 60, 100, 55, 80, 75, 35 };

		var numbersAboveSeventy = numbers.Where(num => num > 70);
		
		foreach (var num in numbersAboveSeventy)
		{
			Console.WriteLine(num);
		}
	}
}
;