How can I remove the same element from Array in C#?
e.g. array{0,2,2,8,4,6,1,0,4}
and output will be array{0,2,8,4,6,1}
You can use LINQ and do myArray.Distinct().ToArray().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With