You could possibly use a LINQ query to do this:
int[] s = { 1, 2, 3, 3, 4};
int[] q = s.Distinct().ToArray();
More Related Contents:
- How do I find duplicates in an array and display how many times they occurred?
- how to write every element of an array in a line of a textbox C# [closed]
- Convert string[] to Array
- Remove duplicates from a List in C#
- Preserving order with LINQ
- Remove element of a regular array
- Algorithm: efficient way to remove duplicate integers from an array
- Using C# to check if string contains a string in string array
- Are arrays or lists passed by default by reference in c#?
- .NET / C# – Convert char[] to string
- C# find highest array value and index
- change array size
- Check if a value is in an array (C#)
- Array Size (Length) in C#
- Passing Arrays by Value and by Reference
- Checking if a string array contains a value, and if so, getting its position
- finding closest value in an array
- Convert array of integers to comma-separated string
- The limitation on the size of .Net array
- Converting an int[] to byte[] in C#
- Converting jagged array to 2D array C#
- Sorting an array related to another array
- Most efficient way to append arrays in C#?
- Why does my C# array lose type sign information when cast to object?
- How to sort two arrays by same index?
- C# unsafe value type array to byte array conversions
- How to sort a list / array of string version number?
- Why is array co-variance considered so horrible?
- byte[] to unsigned BigInteger?
- Byte Array to Bitmap Image