title: Sort list of class objects in c#
body: <p>I want to sort list of class objects.</p>
  
  <pre><code>class tocka
  {
  Point t;
  double kut;
  int redkotiranja;
  
  public tocka(Point _t, double _kut, int _redkotiranja)
  {
  t = _t;
  kut = _kut;
  redkotiranja = _redkotiranja;
  }
  }
  </code></pre>
  
  <p>Here is the list:</p>
  
  <pre><code>List&lt;tocka&gt; tocke= new List&lt;tocka&gt;();
  tocka a = new tocka(new Point(0, 1), 10, 1);
  tocke.Add(a);
  tocka b = new tocka(new Point(5, 1), 10, 1);
  tocke.Add(b);
  tocka c = new tocka(new Point(2, 1), 10, 1);
  tocke.Add(c);
  tocka d = new tocka(new Point(1, 1), 10, 1);
  tocke.Add(d);
  tocka ee = new tocka(new Point(9, 1), 10, 1);
  tocke.Add(ee);
  </code></pre>
  
  <p>I want to sort list <code>tocke</code> by <code>t.X</code></p>
  
  <p>How I do that in C#?</p>