Is Char Hex Digit - CSharp System

CSharp examples for System:Char

Description

Is Char Hex Digit

Demo Code


using System.Linq;
using System.Collections.Generic;

public class Main{
        public static bool IsHexDigit(this char c)
        {/*from w  ww  .ja v  a2  s.  com*/
            return char.IsDigit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
        }
        public static bool IsDigit(this char c)
        {
            return char.IsDigit(c);
        }
}

Related Tutorials