How to find duplicate values in array
how to find duplicate values in array using c#
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Jan 29, 2015, 9:05 PM EST
try this
int[] s = { 1, 2, 3, 3, 4};
int[] q = s.Distinct().ToArray();