// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Globalization
{
///
/// Contains valid formats for Numbers recognized by the Number
/// class' parsing code.
///
[Flags]
public enum NumberStyles
{
None = 0x00000000,
///
/// Bit flag indicating that leading whitespace is allowed. Character values
/// 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, and 0x0020 are considered to be
/// whitespace.
///
AllowLeadingWhite = 0x00000001,
///
/// Bitflag indicating trailing whitespace is allowed.
///
AllowTrailingWhite = 0x00000002,
///
/// Can the number start with a sign char specified by
/// NumberFormatInfo.PositiveSign and NumberFormatInfo.NegativeSign
///
AllowLeadingSign = 0x00000004,
///
/// Allow the number to end with a sign char
///
AllowTrailingSign = 0x00000008,
///
/// Allow the number to be enclosed in parens
///
AllowParentheses = 0x00000010,
AllowDecimalPoint = 0x00000020,
AllowThousands = 0x00000040,
AllowExponent = 0x00000080,
AllowCurrencySymbol = 0x00000100,
AllowHexSpecifier = 0x00000200,
Integer = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign,
HexNumber = AllowLeadingWhite | AllowTrailingWhite | AllowHexSpecifier,
Number = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | AllowTrailingSign |
AllowDecimalPoint | AllowThousands,
Float = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign |
AllowDecimalPoint | AllowExponent,
Currency = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | AllowTrailingSign |
AllowParentheses | AllowDecimalPoint | AllowThousands | AllowCurrencySymbol,
Any = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | AllowTrailingSign |
AllowParentheses | AllowDecimalPoint | AllowThousands | AllowCurrencySymbol | AllowExponent,
}
}