Yesterday I asked this question. Rubens Farias answered it by pointing to this piece of code he wrote. The following part of it cannot be compiled by MS Visual Studio 2010 Professional Beta 2.
byte[] buffer =
Encoding.UTF8.GetBytes(
String.Join("&",
Array.ConvertAll<KeyValuePair<string, string>, string>(
inputs.ToArray(),
delegate(KeyValuePair item)
{
return item.Key + "=" + HttpUtility.UrlEncode(item.Value);
})));
It gives these errors in Visual Studio. Unfortunately Rubens doesn't reply anymore.
So I have the following questions / requests:
- I don't understand this piece of code, please explain what is happening exactly.
- Please explain how this part has te be rewritten in order for it to "work" in VS.
- Please explain how I should convert it to VB.NET. I have tried it using online converters to no avail.