title: Cast List<object> to List<myclass> c#
body: <p>By this code I got list of selected rows in AspxGrid.</p>
  
  <pre><code>string[] fieldName = new string[] { "UserId", "Name", "Address" };
  List&lt;object&gt; SelectedList = Grid.GetSelectedFieldValues(fieldName);
  </code></pre>
  
  <p>Now I want to perform one of the below operation.</p>
  
  <ol>
  <li>Filter this List of object by userid where userid = 1 using linq</li>
  <li>Cast this <code>List&lt;object&gt;</code> into <code>List&lt;Users&gt;</code></li>
  </ol>
  
  <p>I have tried following two methods but Exception occurs.</p>
  
  <blockquote>
    <p>Unable to cast object of type 'System.Object[]' to type
    'CubeDataObject.Claims'.</p>
  </blockquote>
  
  <pre><code>List&lt;Users&gt; mylist = (List&lt;Users&gt;)(Object)SelectedList;
  List&lt;Users&gt; listd = SelectedList.Select(n =&gt; (Users)n).ToList();
  </code></pre>
  
  <p>I have also tried so many other methods too but tired.</p>