example array:
int[] snew = {1,2,3,1};
if use:
int[] inew = snew.Distinct().ToArray();
then out put:
{1,2,3}
but i want out put:
{2,3}
You need to select everything where duplicate count is == 1:
snew.GroupBy(x => x)
.Where(x => x.Count() == 1)
.Select(x => x.First())
.ToArray();
Fiddle here