c# uri.host
Uri.HexUnescape()方法 (Uri.HexUnescape() Method)
Uri.HexUnescape() method is a static method that is used to convert the hexadecimal representation of a character to the character.
Uri.HexUnescape()方法是一种静态方法,用于将字符的十六进制表示形式转换为字符。
Syntax:
句法:
char Uri.HexUnescape (string str, ref int index);
Parameter(s):
参数:
string str – represents the hexadecimal string.
字符串str –代表十六进制字符串。
ref int index – represents a ref variable for index.
ref int index –表示索引的ref变量。
Return value:
返回值:
The return type of this method is char, it returns the character value of the specified character from the given hexadecimal string.
此方法的返回类型为char ,它从给定的十六进制字符串返回指定字符的字符值。
Exception:
例外:
System.ArgumentOutOfRangeException;
Example to demonstrate example of Uri.HexUnescape() method
演示Uri.HexUnescape()方法示例的示例
using System;
class UriExample
{
//Entry point of Program
static public void Main()
{
string str = "%44";
char retChar;
int index = 0;
retChar = Uri.HexUnescape(str,ref index);
Console.WriteLine("Hexadecimal character: "+retChar);
}
}
Output
输出量
Hexadecimal character: D
Press any key to continue . . .
翻译自: https://www.includehelp.com/dot-net/uri-hexunescape-method-with-example.aspx
c# uri.host