Fan.Sys.Locale.dec C# (CSharp) Method

dec() public method

public dec ( ) : NumberFormatInfo
return System.Globalization.NumberFormatInfo
        public NumberFormatInfo dec()
        {
            if (m_dec == null)
            m_dec = dotnet().NumberFormat;
              return m_dec;
        }

Usage Example

Example #1
0
        public static String toLocale(long self, string pattern)
        {
            // if pattern is "B" format as bytes
            if (pattern != null && pattern.Length == 1 && pattern[0] == 'B')
            {
                return(toLocaleBytes(self));
            }

            // get current locale
            Locale           locale = Locale.cur();
            NumberFormatInfo df     = locale.dec();

            // get default pattern if necessary
            if (pattern == null)
            {
                pattern = Env.cur().locale(Sys.m_sysPod, "int", "#,###");
            }

            // parse pattern and get digits
            NumPattern p = NumPattern.parse(pattern);
            NumDigits  d = new NumDigits(self);

            // route to common FanNum method
            return(FanNum.toLocale(p, d, df));
        }
All Usage Examples Of Fan.Sys.Locale::dec