Find the Dulicate value from the array
int[] arr=new int[13] { 1,1,2,6,7,7,8,0,9,7,6,3,4 };
Please refer below code.
C#
int[] arr = new int[13] { 1,1,2,6,7,7,8,0,9,7,6,3,4 }; int[] duplicateValues = arr.GroupBy(x => x).Where(group => group.Count() > 1).Select(y => y.Key).ToArray();
I hope this will help you out.
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.