O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NumberStyles

Synopsis

This enumeration specifies a number of style rules that may be used when a numeric type uses the Parse() method to convert a string into a number.

public enum NumberStyles {
            None = 0x00000000,
            AllowLeadingWhite = 0x00000001,
            AllowTrailingWhite = 0x00000002,
            AllowLeadingSign = 0x00000004,
            Integer = 0x00000007,
            AllowTrailingSign = 0x00000008,
            AllowParentheses = 0x00000010,
            AllowDecimalPoint = 0x00000020,
            AllowThousands = 0x00000040,
            Number = 0x0000006F,
            AllowExponent = 0x00000080,
            Float = 0x000000A7,
            AllowCurrencySymbol = 0x00000100,
            Currency = 0x0000017F,
            Any = 0x000001FF,
            AllowHexSpecifier = 0x00000200,
            HexNumber = 0x00000203
}

Hierarchy

System.ObjectSystem.ValueTypeSystem.Enum(System.IComparable, System.IFormattable, System.IConvertible)NumberStyles

Passed To

System.Byte.Parse(), System.Decimal.Parse(), System.Double.{Parse(), TryParse()}, System.Int16.Parse(), System.Int32.Parse(), System.Int64.Parse(), System.SByte.Parse(), System.Single.Parse(), System.UInt16.Parse(), System.UInt32.Parse(), System.UInt64.Parse()

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required