title: Explain piece of C# code and conversion to VB.NET
body: <p>Yesterday I asked this <a href="https://stackoverflow.com/questions/2139277/download-file-over-https-using-net-dotnet">question</a>. <a href="https://stackoverflow.com/users/113794/rubens-farias">Rubens Farias</a> answered it by pointing to this <a href="https://stackoverflow.com/questions/1525697/java-orkut-login/1529140#1529140">piece of code</a> he wrote. The following part of it cannot be compiled by MS Visual Studio 2010 Professional Beta 2.</p>
  
  <pre><code>byte[] buffer = 
  Encoding.UTF8.GetBytes(
      String.Join("&amp;", 
          Array.ConvertAll&lt;KeyValuePair&lt;string, string&gt;, string&gt;(
              inputs.ToArray(),
              delegate(KeyValuePair item)
              {
                  return item.Key + "=" + HttpUtility.UrlEncode(item.Value);
              })));
  </code></pre>
  
  <p>It gives <a href="http://img11.imageshack.us/img11/3748/codehb.png" rel="nofollow noreferrer">these</a> errors in Visual Studio. Unfortunately Rubens doesn't reply anymore.</p>
  
  <p>So I have the following questions / requests:</p>
  
  <ol>
  <li>I don't understand this piece of code, please explain what is happening exactly.</li>
  <li>Please explain how this part has te be rewritten in order for it to "work" in VS.</li>
  <li>Please explain how I should convert it to VB.NET. I have tried it using online converters to no avail.</li>
  </ol>