sum value and remove duplicates in List<> : <p>I want to check the duplicate values in the list and bring the prices together.</p>

<p>Follow the example below.</p>

<p>ex.</p>

<pre><code>var list = new List&lt;Item&gt;();
list.Add(new Item() { code= "521523", text= "cookie", price= 5});
list.Add(new Item() { code= "521523", text= "donut", price= 20 });
list.Add(new Item() { code= "521524", text= "coffee", price= 15 });
list.Add(new Item() { code= "521524", text= "water", price= 16 });
list.Add(new Item() { code= "521525", text= "other", price= 16 });
</code></pre>

<p>result</p>

<pre><code>code= "521523", text= "cookie", price= 25
code= "521524", text= "coffee", price= 31
code= "521525", text= "other", price= 16
</code></pre>
