Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetInstance()

static NumberFormatInfo System.Globalization.NumberFormatInfo.GetInstance ( IFormatProvider? formatProvider)
inlinestatic

Definition at line 661 of file NumberFormatInfo.cs.

662 {
663 if (formatProvider != null)
664 {
665 return GetProviderNonNull(formatProvider);
666 }
667 return CurrentInfo;
668 static NumberFormatInfo GetProviderNonNull(IFormatProvider provider)
669 {
670 if (provider is CultureInfo { _isInherited: false } cultureInfo)
671 {
672 return cultureInfo._numInfo ?? cultureInfo.NumberFormat;
673 }
674 return (provider as NumberFormatInfo) ?? (provider.GetFormat(typeof(NumberFormatInfo)) as NumberFormatInfo) ?? CurrentInfo;
675 }
676 }

References System.Globalization.NumberFormatInfo.NumberFormatInfo(), System.Globalization.NumberFormatInfo.CurrentInfo, and System.IFormatProvider.GetFormat().

Referenced by System.Number.FormatInt32(), System.Number.FormatInt64(), System.Number.FormatUInt32(), System.Number.FormatUInt64(), System.Double.Parse(), System.Half.Parse(), System.Single.Parse(), System.Byte.Parse(), System.Int16.Parse(), System.Int32.Parse(), System.Int64.Parse(), System.SByte.Parse(), System.UInt16.Parse(), System.UInt32.Parse(), System.UInt64.Parse(), System.Decimal.Parse(), System.Numerics.BigInteger.Parse(), System.Byte.Parse(), System.Decimal.Parse(), System.Double.Parse(), System.Half.Parse(), System.Int16.Parse(), System.Int32.Parse(), System.Int64.Parse(), System.SByte.Parse(), System.Single.Parse(), System.UInt16.Parse(), System.UInt32.Parse(), System.UInt64.Parse(), System.Byte.Parse(), System.Decimal.Parse(), System.Double.Parse(), System.Int16.Parse(), System.Int32.Parse(), System.Int64.Parse(), System.SByte.Parse(), System.Single.Parse(), System.UInt16.Parse(), System.UInt32.Parse(), System.UInt64.Parse(), System.Half.Parse(), System.Numerics.BigInteger.Parse(), System.Numerics.BigInteger.Parse(), System.Decimal.ToString(), System.Double.ToString(), System.Half.ToString(), System.Single.ToString(), System.Numerics.BigInteger.ToString(), System.Numerics.Vector< T >.ToString(), System.Numerics.Vector2.ToString(), System.Numerics.Vector3.ToString(), System.Numerics.Vector4.ToString(), System.Decimal.ToString(), System.Double.ToString(), System.Half.ToString(), System.Single.ToString(), System.Numerics.BigInteger.ToString(), System.Decimal.TryFormat(), System.Double.TryFormat(), System.Half.TryFormat(), System.Single.TryFormat(), System.Numerics.BigInteger.TryFormat(), System.Number.TryFormatInt32(), System.Number.TryFormatInt64(), System.Number.TryFormatUInt32(), System.Number.TryFormatUInt64(), System.Byte.TryParse(), System.Decimal.TryParse(), System.Double.TryParse(), System.Single.TryParse(), System.Int32.TryParse(), System.Int64.TryParse(), System.SByte.TryParse(), System.Int16.TryParse(), System.UInt32.TryParse(), System.UInt64.TryParse(), System.UInt16.TryParse(), System.Numerics.BigInteger.TryParse(), System.Byte.TryParse(), System.Decimal.TryParse(), System.Double.TryParse(), System.Single.TryParse(), System.Half.TryParse(), System.Int32.TryParse(), System.Int64.TryParse(), System.SByte.TryParse(), System.Int16.TryParse(), System.UInt32.TryParse(), System.UInt64.TryParse(), System.UInt16.TryParse(), and System.Numerics.BigInteger.TryParse().