How to sort Generic.List<> by comparing with 1 string
<p>I have generic list already filled with values, I need to sort items, that first value should appear same as query string. Is it possible to compare and sort this values, I'm trying with no success.</p>

<p>Bit updating my question.</p>

<p>For example I have Id: 1,2,3,4,5, and I opened page with Id=5, so I need on my searchResult, to pass 4 as first item in the list.</p>

<p>This code for me worked fine and showing 5 as first item, but I need to force for example p2.ObjectId pass as string value just for example "4294", and object with this Id should appear first:</p>

<pre><code>Sort(searchresult);

   static void Sort(List&lt;CollectionsItem&gt; list)
        {
            list.Sort((p1, p2) =&gt; string.Compare(p2.ObjectId, p1.ObjectId, true));
        }
</code></pre>
