Can't make simple list operation in C#
<p>I'm trying to make a function with list.
It is to sort and delete duplicates. 
It sorts good, but don't delete duplictates. 
What's the problem?</p>

<pre><code>void sort_del(List&lt;double&gt; slist){
        //here i sort slist
        //get sorted with duplicates

        List&lt;double&gt; rlist = new List&lt;double&gt;();
        int new_i=0;
        rlist.Add(slist[0]);
        for (i = 0; i &lt; size; i++)
        {
            if (slist[i] != rlist[new_i])
            {
                rlist.Add(slist[i]);
                new_i++;
            }

        }

        slist = new List&lt;double&gt;(rlist);
        //here get without duplicates
    }
</code></pre>
