1 //------------------------------------------------------------------------------
3 // System.Globalization.NumberStyles.cs
5 // Copyright (C) 2001 Michael Lambert, All Rights Reserved
7 // Author: Michael Lambert, michaellambert@email.com
8 // Created: Thu 07/18/2001
10 // Modified: 7/20/01, Derek Holden (dholden@draper.com)
11 // Added ECMA values for allows and masks for data types
13 //------------------------------------------------------------------------------
16 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
18 // Permission is hereby granted, free of charge, to any person obtaining
19 // a copy of this software and associated documentation files (the
20 // "Software"), to deal in the Software without restriction, including
21 // without limitation the rights to use, copy, modify, merge, publish,
22 // distribute, sublicense, and/or sell copies of the Software, and to
23 // permit persons to whom the Software is furnished to do so, subject to
24 // the following conditions:
26 // The above copyright notice and this permission notice shall be
27 // included in all copies or substantial portions of the Software.
29 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
30 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
31 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
32 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
33 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
34 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
35 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38 namespace System.Globalization {
43 [System.Runtime.InteropServices.ComVisible(true)]
45 public enum NumberStyles {
47 AllowLeadingWhite = 0x00000001,
48 AllowTrailingWhite = 0x00000002,
49 AllowLeadingSign = 0x00000004,
50 AllowTrailingSign = 0x00000008,
51 AllowParentheses = 0x00000010,
52 AllowDecimalPoint = 0x00000020,
53 AllowThousands = 0x00000040,
54 AllowExponent = 0x00000080,
55 AllowCurrencySymbol = 0x00000100,
56 AllowHexSpecifier = 0x00000200,
58 Integer = ( AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign ),
59 HexNumber = ( AllowLeadingWhite | AllowTrailingWhite | AllowHexSpecifier ),
60 Number = ( AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign |
61 AllowTrailingSign | AllowDecimalPoint | AllowThousands ),
62 Float = ( AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign |
63 AllowDecimalPoint | AllowExponent ),
64 Currency = ( AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign |
65 AllowTrailingSign | AllowParentheses | AllowDecimalPoint |
66 AllowThousands | AllowCurrencySymbol ),
67 Any = ( AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign |
68 AllowTrailingSign | AllowParentheses | AllowDecimalPoint |
69 AllowThousands | AllowExponent | AllowCurrencySymbol ),