I've translate this code from C# to VB.NET, but still I can't get 1 line translated. I tried http://converter.telerik.com/
and http://www.carlosag.net/tools/codetranslator/ but none of them know how to translate the line please help.
public static string UrlEncode(string value)
{
StringBuilder result = new StringBuilder();
foreach (char symbol in value)
{
if (unreservedChars.IndexOf(symbol) != -1)
{
result.Append(symbol);
}
else
{
result.Append('%' + String.Format("{0:X2}", (int)symbol));
}
}
return result.ToString();
}
vb.net:
Public Shared Function UrlEncode(value As String) As String
Dim result As New StringBuilder()
For Each symbol As Char In value
If unreservedChars.IndexOf(symbol) <> -1 Then
resul ...
Go to the complete details ...