title: LINQ group by and order by in C#
body: <p>I need to convert my city list into group by state and order by city within it.</p>
  
  <p>I tried below one but not able to get it right. Would appreciate any help on this.</p>
  
  <pre><code>cities.GroupBy(g =&gt; g.state).Select(o =&gt; o.OrderBy(c =&gt; c.cityname));
  </code></pre>