title: In c# convert anonymous type into key/value array?
body: <p>I have the following anonymous type:</p>
  
  <pre><code>new {data1 = "test1", data2 = "sam", data3 = "bob"}
  </code></pre>
  
  <p>I need a method that will take this in, and output key value pairs in an array or dictionary. </p>
  
  <p>My goal is to use this as post data in an HttpRequest so i will eventually concatenate in into the following string:</p>
  
  <pre><code>"data1=test1&amp;data2=sam&amp;data3=bob"
  </code></pre>