title: Sort list by field (C#)
body: <p>I have class like:</p>
  
  <pre><code>class SortNode
  {
      public Int32 m_valRating = 0;
  
      public SortNode(Int32 valRating)
      {
          this.m_valRating = valRating;
      }
  }
  </code></pre>
  
  <p>and some list <code>refSortNodeList</code>:</p>
  
  <pre><code>List&lt;SortNode&gt; refSortNodeList = new List&lt;SortNode&gt;();
  
  Random refRandom = new Random();
  
  for (int i = 0; i &lt; 100; ++i)
  {
      refSortNodeList.Add(new SortNode(refRandom.Next(-10, 30)));
  }
  
  foreach (var varSortNode in refSortNodeList)
  {
      Console.WriteLine("SortNode rating is {0}", varSortNode.m_valRating);
  }
  </code></pre>
  
  <p>How to sort easily my <code>refSortNodeList</code> by <code>m_valRating</code> field? Or maybe I need to use some another <code>List</code> class?</p>