title: In C# Convert List<dynamic> to List<string>
body: <p>Suppose I have a <code>List&lt;dynamic&gt;</code> object containing strings:</p>
  
  <pre><code>var dlist = new List&lt;dynamic&gt;()
  {
      "test",
      "test2",
      "test3"
  };
  </code></pre>
  
  <p>Is there any efficient way of converting this into a proper <code>List&lt;string&gt;</code> object? I know I can iterate over this list and cast each element to a string, then add this to the result list, but maybe some Linq magic could do the trick in one line?</p>
  
  <p>I tried using some <code>Select()</code> combined with <code>ToList()</code> and <code>Cast&lt;string&gt;</code>, but to no avail. How should this be done properly?</p>
  
  <p><strong>Note</strong>: By saying "efficient" I mean of course number of lines of code. I do not take execution time or performance into account. Also - let's suppose I do not need to type check, there will always be strings only in this dynamic list.</p>
  
  <p>EDIT: Okay, so in regards to comments on "why Cast wasn't working for you" - looks like I had another problem regarding the data I receive (I'm using Dapper) and that's why it didn't work. Sorry for the confusion, I thought my list converting was wrong while the problem was not related to this.</p>