title: Convert list<object> list to dictionary from linq to sql query results c#
body: <p>Im trying to convert the results of a ling to sql select results to a dictionary. </p>
  
  <p>when do this:    </p>
  
  <pre><code>var dict = new Dictionary&lt;string, string&gt;();
  var encodedContent = new FormUrlEncodedContent(dict);
  </code></pre>
  
  <p>id accepts the dictionary with no issues.</p>
  
  <p>When i do this:</p>
  
  <pre><code>var dict = leads
      .Select((s, i) =&gt; new { s, i })
      .ToDictionary(x =&gt; x.i, x =&gt; x.s)
      .GetEnumerator();
  
  var encodedContent = new FormUrlEncodedContent(dict);
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>Severity  Code    Description Project File    Line    Suppression State
    Error CS1503  Argument 1: cannot convert from
    <code>System.Collections.Generic.Dictionary&lt;int,PostLeadsToClient.Models.EducatorLead&gt;.Enumerator</code> to <code>System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;string, string&gt;&gt;</code>    PostLeadsToClient   C:\RGI
    Projects\PostLeadsToClient\PostLeadsToClient\Program.cs   159 Active</p>
  </blockquote>
  
  <p>I cannot for the live of me figure out what I am doing wrong.  </p>
  
  <p>Im i convert the results of the query wrong? </p>