Distinct
Mamataliyev Diyorbek
using System;
using System.Linq;
namespace NetConsoleApp
{
class Program
{
static void Main(string[] args)
{
int[] sonlar = new int[] { 1, 2, 1, 45, 3, 4, 32, 2, 1, 5, 91, 56, 45 };
var takrorlanmasSonlar = sonlar.Where(e => e < 50).Distinct();
foreach (var item in takrorlanmasSonlar)
Console.Write(item + " ");
Console.ReadKey();
}
}
}Last updated
Was this helpful?