c# Linq List<T>.Where().ToList() create new instances of <T> : <p>I have a class, Solution.
I use this class as a List which I don't want to grow unnecessarily.</p>

<p>I search the list to get a preexisting entry and return that -or- create a new entry if need be:</p>

<pre><code>var s0 = _solutions.Where(x =&gt; x.strtId == strtNodeId &amp;&amp; x.endId == endNodeId).ToList();
</code></pre>

<p>However, Linq will actually create new instances when where is true.
But, as you might already see, that is not what I want.</p>

<p>The combination of <code>x.startNode &amp;&amp; x.endNode</code> is unique in all instances of <code>_solution</code></p>

<p>At the end what I need is the reference to the one instance of _solution being searched for, if it already exists.</p>

<p>But what can I do aside from creating my own for loop/s?</p>

<p>Thanks.</p>
