Set distinct simple - method syntax

CSharp · Console

/Program.cs

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

		var distinctScores = scores.Distinct();
		
		foreach (var score in distinctScores)
		{
			Console.WriteLine(score);
		}
	}
}
;