c# using Linq to sort a list of decimals
<p>As the title suggests, I have a list of prices that I wish to sort.
I tried doing this:</p>

<pre><code>prices.Sort((a, b) =&gt; a - b);
</code></pre>

<p>but I get an error:</p>

<blockquote>
  <p>Cannot implicitly convert type 'decimal' to 'int'.
  Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type</p>
</blockquote>

<p>I tried to expand this an do something like</p>

<pre><code>prices.Sort((a, b) {
    var x = double.Parse(a);
    var y = double.Parse(b);
    return x - y;
});
</code></pre>

<p>but I got the same error.
Does anyone know how I can do this easily?</p>