title: How do I sort the dynamic list in c#
body: <pre><code>function void sortDynamicData(typeOfClass,SortKey)
  {
  List&lt;dynamic&gt; results = null; //results might be of any type it may contain students data or books data or professors data, hence I took as dynamic
  results = services.GetMyresults(typeOfClass); //returns list of dynamic objects
  
  results = results.OrderBy(SortKey).ToList();
   ...
   ...
   ...
  
  }
  </code></pre>
  
  <p>my question is I want to sort the results based on sortKey
  Any help would be greatly appreciable.</p>