c# uri.host
Uri.IsHexDigit()方法 (Uri.IsHexDigit() Method)
Uri.IsHexDigit() method is a static method to check given character is a hex digit or not. It returns true if a given character is hex digit, otherwise, it returns false.
Uri.IsHexDigit()方法是一种静态方法,用于检查给定字符是否为十六进制数字。 如果给定的字符是十六进制数字,则返回true,否则,返回false。
Syntax:
句法:
bool Uri.IsHexDigit (char ch);
Parameter(s):
参数:
char ch – represents the character to be checked for hex digit.
char ch –代表要检查的十六进制字符。
Return value:
返回值:
The return type of this method is string, it returns a Boolean value.
该方法的返回类型为string ,它返回一个布尔值。
Example to demonstrate example of Uri.IsHexDigit() method
演示Uri.IsHexDigit()方法示例的示例
using System;
class UriExample
{
//Entry point of Program
static public void Main()
{
char ch1 = 'e';
char ch2 = 'g';
if (Uri.IsHexDigit(ch1))
Console.WriteLine("It is hex digit");
else
Console.WriteLine("It is not hex digit");
if (Uri.IsHexDigit(ch2))
Console.WriteLine("It is hex digit");
else
Console.WriteLine("It is not hex digit");
}
}
Output
输出量
It is hex digit
It is not hex digit
翻译自: https://www.includehelp.com/dot-net/uri-ishexdigit-method-with-example.aspx
c# uri.host