Candor.LexicalCharacterSetExtensions.ToCharacterSet C# (CSharp) Method

ToCharacterSet() public static method

Casts the enumeration value of known types into the matching character set.
public static ToCharacterSet ( this knownType ) : LexicalCharacterSet
knownType this
return LexicalCharacterSet
        public static LexicalCharacterSet ToCharacterSet(this LexicalCharacterSetType knownType)
        {
            switch (knownType)
            {
                case LexicalCharacterSetType.Numeric:
                    return LexicalCharacterSet.Numeric;
                case LexicalCharacterSetType.AsciiAlpha:
                    return LexicalCharacterSet.AsciiAlpha;
                case LexicalCharacterSetType.AsciiAlphaNumeric:
                case LexicalCharacterSetType.AsciiAuto:
                    return LexicalCharacterSet.AsciiAlphaNumeric;
                default:
                    throw new ArgumentException(String.Format("LexicalCharacterSetType '{0}' cannot be converted directly to a character set.", knownType));
            }
        }

Same methods

LexicalCharacterSetExtensions::ToCharacterSet ( this knownType, String matching, bool ignoreCase ) : LexicalCharacterSet
LexicalCharacterSetExtensions