昨天我問了這個question。 Rubens Farias指向他寫的這個piece of code回答。它下面的部分不能由MS的Visual Studio 2010專業版Beta 2中解釋一塊C#代碼並轉換爲VB.NET
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);
})));
它給在Visual Studio these錯誤進行編譯。不幸的是Rubens不再回復。
所以,我有以下幾個問題/請求:
- 我不明白這一段代碼,請解釋究竟是什麼發生。
- 請解釋如何改寫這部分,以便它在VS中「工作」。
- 請解釋我應該如何將其轉換爲VB.NET。我已經嘗試使用在線轉換器無濟於事。
恩,你說的是魯本斯嗎? :) http://stackoverflow.com/users/113794/rubens-farias – 2010-01-27 09:38:23
是的,這就是他。 – George 2010-01-27 09:43:17