c# uri.host_C#| Uri.IsHexDigit()方法与示例

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值