DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Distinct Using LINQ
int[] numberList = { 2, 2, 3,3,3, 4, 4 };
var distinctNumbers = numberList.Distinct();
foreach (var f in distinctNumbers)
{
Console.WriteLine(f);
}





