zoukankan      html  css  js  c++  java
  • System.Globalization.NumberFormatInfo.cs

    ylbtech-System.Globalization.NumberFormatInfo.cs
    1.返回顶部
    1、
    #region 程序集 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    // C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFrameworkv4.6.1mscorlib.dll
    #endregion
    
    using System.Runtime.InteropServices;
    
    namespace System.Globalization
    {
        //
        // 摘要:
        //     提供用于对数字值进行格式设置和分析的区域性特定信息。
        [ComVisible(true)]
        public sealed class NumberFormatInfo : ICloneable, IFormatProvider
        {
            //
            // 摘要:
            //     初始化不依赖于区域性的(固定的)System.Globalization.NumberFormatInfo 类的新可写实例。
            public NumberFormatInfo();
    
            //
            // 摘要:
            //     获取基于当前区域性对值进行格式设置的只读的 System.Globalization.NumberFormatInfo。
            //
            // 返回结果:
            //     基于当前线程的区域性的只读的 System.Globalization.NumberFormatInfo。
            public static NumberFormatInfo CurrentInfo { get; }
            //
            // 摘要:
            //     获取不依赖于区域性的(固定)只读的 System.Globalization.NumberFormatInfo 对象。
            //
            // 返回结果:
            //     不依赖于区域性的(固定的)默认只读对象。
            public static NumberFormatInfo InvariantInfo { get; }
            //
            // 摘要:
            //     获取或设置表示负无穷大的字符串。
            //
            // 返回结果:
            //     表示负无穷大的字符串。 System.Globalization.NumberFormatInfo.InvariantInfo 默认为“Infinity”。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public string NegativeInfinitySymbol { get; set; }
            //
            // 摘要:
            //     获取或设置表示关联数字是负值的字符串。
            //
            // 返回结果:
            //     表示关联数字是负值的字符串。 System.Globalization.NumberFormatInfo.InvariantInfo 默认为“-”。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public string NegativeSign { get; set; }
            //
            // 摘要:
            //     获取或设置在数值中使用的小数位数。
            //
            // 返回结果:
            //     在数值中使用的小数位数。 System.Globalization.NumberFormatInfo.InvariantInfo 的默认值为 2。
            //
            // 异常:
            //   T:System.ArgumentOutOfRangeException:
            //     该属性设置为一个小于 0 或大于 99 的值。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public int NumberDecimalDigits { get; set; }
            //
            // 摘要:
            //     获取或设置在数值中用作小数分隔符的字符串。
            //
            // 返回结果:
            //     在数值中用作小数分隔符的字符串。 System.Globalization.NumberFormatInfo.InvariantInfo 默认为“.”。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            //
            //   T:System.ArgumentException:
            //     该属性被设置为空字符串。
            public string NumberDecimalSeparator { get; set; }
            //
            // 摘要:
            //     获取或设置在数值中隔开小数点左边的位数组的字符串。
            //
            // 返回结果:
            //     在数值中隔开小数点左边的位数组的字符串。 System.Globalization.NumberFormatInfo.InvariantInfo 默认为“,”。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public string NumberGroupSeparator { get; set; }
            //
            // 摘要:
            //     获取或设置正货币值的格式模式。
            //
            // 返回结果:
            //     正货币值的格式模式。 System.Globalization.NumberFormatInfo.InvariantInfo 的默认值是 0,它表示“$n”,其中“$”是
            //     System.Globalization.NumberFormatInfo.CurrencySymbol,n 是一个数字。
            //
            // 异常:
            //   T:System.ArgumentOutOfRangeException:
            //     该属性设置为一个小于 0 或大于 3 的值。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public int CurrencyPositivePattern { get; set; }
            //
            // 摘要:
            //     获取或设置表示正无穷大的字符串。
            //
            // 返回结果:
            //     表示正无穷大的字符串。 System.Globalization.NumberFormatInfo.InvariantInfo 默认为“Infinity”。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public string PositiveInfinitySymbol { get; set; }
            //
            // 摘要:
            //     获取或设置指示关联数字是正值的字符串。
            //
            // 返回结果:
            //     指示关联数字是正值的字符串。 System.Globalization.NumberFormatInfo.InvariantInfo 默认为“+”。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     在设置操作中,要分配的值是 null。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public string PositiveSign { get; set; }
            //
            // 摘要:
            //     获取或设置在百分比值中使用的小数位数。
            //
            // 返回结果:
            //     要在百分比值中使用的小数位数。 System.Globalization.NumberFormatInfo.InvariantInfo 的默认值为 2。
            //
            // 异常:
            //   T:System.ArgumentOutOfRangeException:
            //     该属性设置为一个小于 0 或大于 99 的值。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public int PercentDecimalDigits { get; set; }
            //
            // 摘要:
            //     获取或设置在百分比值中用作小数点分隔符的字符串。
            //
            // 返回结果:
            //     在百分比值中用作小数分隔符的字符串。 System.Globalization.NumberFormatInfo.InvariantInfo 默认为“.”。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            //
            //   T:System.ArgumentException:
            //     该属性被设置为空字符串。
            public string PercentDecimalSeparator { get; set; }
            //
            // 摘要:
            //     获取或设置在百分比值中隔离小数点左边数字组的字符串。
            //
            // 返回结果:
            //     在百分比值中隔开小数点左边的位数组的字符串。 System.Globalization.NumberFormatInfo.InvariantInfo 默认为“,”。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public string PercentGroupSeparator { get; set; }
            //
            // 摘要:
            //     获取或设置用作百分比符号的字符串。
            //
            // 返回结果:
            //     用作百分比符号的字符串。 System.Globalization.NumberFormatInfo.InvariantInfo 默认为“%”。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public string PercentSymbol { get; set; }
            //
            // 摘要:
            //     获取或设置用作千分比符号的字符串。
            //
            // 返回结果:
            //     用作千分比符号的字符串。 System.Globalization.NumberFormatInfo.InvariantInfo 默认为“‰”,它是 Unicode
            //     字符 U+2030。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public string PerMilleSymbol { get; set; }
            //
            // 摘要:
            //     获取或设置负百分比值的格式模式。
            //
            // 返回结果:
            //     负百分比值的格式模式。 System.Globalization.NumberFormatInfo.InvariantInfo 的默认值是 0,它表示“-n
            //     %”,其中“%”是 System.Globalization.NumberFormatInfo.PercentSymbol,n 是一个数字。
            //
            // 异常:
            //   T:System.ArgumentOutOfRangeException:
            //     该属性设置为小于 0 或大于 11 的值。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public int PercentNegativePattern { get; set; }
            //
            // 摘要:
            //     获取或设置正百分比值的格式模式。
            //
            // 返回结果:
            //     正百分比值的格式模式。 System.Globalization.NumberFormatInfo.InvariantInfo 的默认值是 0,它表示“n
            //     %”,其中“%”是 System.Globalization.NumberFormatInfo.PercentSymbol,n 是一个数字。
            //
            // 异常:
            //   T:System.ArgumentOutOfRangeException:
            //     该属性设置为一个小于 0 或大于 3 的值。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public int PercentPositivePattern { get; set; }
            //
            // 摘要:
            //     获取或设置负数值的格式模式。
            //
            // 返回结果:
            //     负数值的格式模式。
            //
            // 异常:
            //   T:System.ArgumentOutOfRangeException:
            //     该属性设置为一个小于 0 或大于 4 的值。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public int NumberNegativePattern { get; set; }
            //
            // 摘要:
            //     获取或设置负货币值的格式模式。
            //
            // 返回结果:
            //     负货币值的格式模式。 System.Globalization.NumberFormatInfo.InvariantInfo 的默认值是 0,它表示“($n)”,其中“$”是
            //     System.Globalization.NumberFormatInfo.CurrencySymbol,n 是一个数字。
            //
            // 异常:
            //   T:System.ArgumentOutOfRangeException:
            //     该属性设置为一个小于 0 或大于 15 的值。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public int CurrencyNegativePattern { get; set; }
            //
            // 摘要:
            //     获取或设置表示 IEEE NaN(非数字)值的字符串。
            //
            // 返回结果:
            //     表示 IEEE NaN(非数字)值的字符串。 System.Globalization.NumberFormatInfo.InvariantInfo 默认为“NaN”。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public string NaNSymbol { get; set; }
            //
            // 摘要:
            //     获取或设置用作货币符号的字符串。
            //
            // 返回结果:
            //     用作货币符号的字符串。 System.Globalization.NumberFormatInfo.InvariantInfo 默认为“¤”。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public string CurrencySymbol { get; set; }
            //
            // 摘要:
            //     获取或设置在货币值中隔开小数点左边的位数组的字符串。
            //
            // 返回结果:
            //     在货币值中隔开小数点左边的位数组的字符串。 System.Globalization.NumberFormatInfo.InvariantInfo 默认为“,”。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public string CurrencyGroupSeparator { get; set; }
            //
            // 摘要:
            //     获取或设置在百分比值中小数点左边每一组的位数。
            //
            // 返回结果:
            //     百分比值中小数点左边的每一组的位数。 System.Globalization.NumberFormatInfo.InvariantInfo 的默认值是一个一维数组,该数组只包含一个设置为
            //     3 的元素。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.ArgumentException:
            //     设置了该属性,但数组包含一个小于 0 或大于 9 的项。 - 或 - 设置了该属性,但数组包含一个设置为 0 的项(最后一项除外)。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public int[] PercentGroupSizes { get; set; }
            //
            // 摘要:
            //     获取或设置数值中小数点左边每一组的位数。
            //
            // 返回结果:
            //     数值中小数点左边每一组的位数。 System.Globalization.NumberFormatInfo.InvariantInfo 的默认值是一个一维数组,该数组只包含一个设置为
            //     3 的元素。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.ArgumentException:
            //     设置了该属性,但数组包含一个小于 0 或大于 9 的项。 - 或 - 设置了该属性,但数组包含一个设置为 0 的项(最后一项除外)。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public int[] NumberGroupSizes { get; set; }
            //
            // 摘要:
            //     获取或设置货币值中小数点左边每一组的位数。
            //
            // 返回结果:
            //     货币值中小数点左边每一组的位数。 System.Globalization.NumberFormatInfo.InvariantInfo 的默认值是一个一维数组,该数组只包含一个设置为
            //     3 的元素。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.ArgumentException:
            //     设置了该属性,但数组包含一个小于 0 或大于 9 的项。 - 或 - 设置了该属性,但数组包含一个设置为 0 的项(最后一项除外)。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public int[] CurrencyGroupSizes { get; set; }
            //
            // 摘要:
            //     获取一个值,该值指示 System.Globalization.NumberFormatInfo 对象是否为只读。
            //
            // 返回结果:
            //     如果 System.Globalization.NumberFormatInfo 是只读的,则为 true;否则为 false。
            public bool IsReadOnly { get; }
            //
            // 摘要:
            //     获取或设置要在货币值中用作小数分隔符的字符串。
            //
            // 返回结果:
            //     要在货币值中用作小数分隔符的字符串。 System.Globalization.NumberFormatInfo.InvariantInfo 默认为“.”。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     该属性设置为 null。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            //
            //   T:System.ArgumentException:
            //     该属性被设置为空字符串。
            public string CurrencyDecimalSeparator { get; set; }
            //
            // 摘要:
            //     获取或设置在货币值中使用的小数位数。
            //
            // 返回结果:
            //     要在货币值中使用的小数位数。 System.Globalization.NumberFormatInfo.InvariantInfo 的默认值为 2。
            //
            // 异常:
            //   T:System.ArgumentOutOfRangeException:
            //     该属性设置为一个小于 0 或大于 99 的值。
            //
            //   T:System.InvalidOperationException:
            //     设置了该属性,但 System.Globalization.NumberFormatInfo 对象为只读。
            public int CurrencyDecimalDigits { get; set; }
            //
            // 摘要:
            //     获取或设置与西文数字 0 到 9 等同的本机数字的字符串数组。
            //
            // 返回结果:
            //     包含与西文数字 0 到 9 等同的本机数字的字符串数组。 默认值是包含元素“0”、“1”、“2”、“3”、“4”、“5”、“6”、“7”、“8”和“9”的一个数组。
            //
            // 异常:
            //   T:System.InvalidOperationException:
            //     当前 System.Globalization.NumberFormatInfo 对象为只读。
            //
            //   T:System.ArgumentNullException:
            //     在集运算中,值为 null。 - 或 - 在集运算中,值数组的元素是 null。
            //
            //   T:System.ArgumentException:
            //     在集运算中,值数组不包含 10 个元素。 - 或 - 在集运算中,值数组的元素不包含单个 System.Char 对象或一对构成代理项对的 System.Char
            //     对象。 - 或 - 在设置操作中,值数组的元素不是按照定义的数字数字 Unicode Standard。 即,数组元素中的数字不具有 Unicode Number,
            //     Decimal Digit (Nd) 常规类别值。 - 或 - 在集运算中,值数组中的元素的数值不对应数组中元素的位置。 也就是说,位于索引 0 的元素(数组的第一个元素)不具有数值
            //     0,或位于索引 1 处的元素不具有数值 1。
            [ComVisible(false)]
            public string[] NativeDigits { get; set; }
            //
            // 摘要:
            //     获取或设置指定图形用户界面如何显示数字形状的值。
            //
            // 返回结果:
            //     指定区域性特定的数字形状的枚举值之一。
            //
            // 异常:
            //   T:System.InvalidOperationException:
            //     当前 System.Globalization.NumberFormatInfo 对象为只读。
            //
            //   T:System.ArgumentException:
            //     设置操作中的值不是有效的 System.Globalization.DigitShapes 值。
            [ComVisible(false)]
            public DigitShapes DigitSubstitution { get; set; }
    
            //
            // 摘要:
            //     获取与指定 System.Globalization.NumberFormatInfo 关联的 System.IFormatProvider。
            //
            // 参数:
            //   formatProvider:
            //     用于获取 System.Globalization.NumberFormatInfo 的 System.IFormatProvider。 - 或 - 要获取
            //     System.Globalization.NumberFormatInfo.CurrentInfo 的 null。
            //
            // 返回结果:
            //     与指定 System.Globalization.NumberFormatInfo 关联的 System.IFormatProvider。
            public static NumberFormatInfo GetInstance(IFormatProvider formatProvider);
            //
            // 摘要:
            //     返回只读的 System.Globalization.NumberFormatInfo 包装。
            //
            // 参数:
            //   nfi:
            //     要包装的 System.Globalization.NumberFormatInfo。
            //
            // 返回结果:
            //     nfi 周围的只读 System.Globalization.NumberFormatInfo 包装。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     nfi 为 null。
            public static NumberFormatInfo ReadOnly(NumberFormatInfo nfi);
            //
            // 摘要:
            //     创建 System.Globalization.NumberFormatInfo 对象的浅表副本。
            //
            // 返回结果:
            //     从原始 System.Globalization.NumberFormatInfo 对象复制的新对象。
            public object Clone();
            //
            // 摘要:
            //     获取提供数字格式化服务的指定类型的对象。
            //
            // 参数:
            //   formatType:
            //     所需格式化服务的 System.Type。
            //
            // 返回结果:
            //     如果 formatType 与当前 System.Globalization.NumberFormatInfo 的类型相同,则为当前 System.Globalization.NumberFormatInfo;否则为
            //     null。
            public object GetFormat(Type formatType);
        }
    }
    2、
    2.返回顶部
     
    3.返回顶部
     
    4.返回顶部
     
    5.返回顶部
     
     
    6.返回顶部
     
    warn 作者:ylbtech
    出处:http://ylbtech.cnblogs.com/
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    bzoj 1098 [POI2007] 办公楼 biu
    「 Luogu P2574 」 XOR的艺术——线段树
    「 Luogu P2801 」 教主的魔法——分块
    Luogu P1438 无聊的数列
    「 Luogu P2420 」 让我们异或吧
    「 SPOJ GSS3 」 Can you answer these queries III
    「 HDOJ P2227 」 Find the nondecreasing subsequences
    「 HDOJ P3887 」 Counting Offspring
    一些性质及公式
    OI杂记
  • 原文地址:https://www.cnblogs.com/storebook/p/12677123.html
Copyright © 2011-2022 走看看