Compact an Array function in C#
<p>How can I make a Function to compact an array with duplicate entries?</p>

<p>For example!</p>

<p>A function that will take a sorted array of integers and return the array compacted. That is, given an array containing: 1, 2, 6, 8, 8, 8, 9, 10, 10, when the function returns, the contents of the array should be: 1, 2, 6, 8, 9, 10.</p>

<p>This is NOT hw. I am trying to make a function that will do this.</p>
