20 instantiations of NumberFormatInfo
System.Private.CoreLib (2)
System.Private.Xml (4)
System.Windows.Forms.Tests (14)
901 references to NumberFormatInfo
dotnet-svcutil.xmlserializer (1)
dotnet-svcutil-lib (131)
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaSetCompiler.cs (26)
1567_restrictionErrorMsg = string.Format(ResXml.Sch_SeqFromAll, derivedParticle.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedParticle.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseParticle.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseParticle.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1601_restrictionErrorMsg = string.Format(ResXml.Sch_SeqFromChoice, derivedParticle.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedParticle.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseParticle.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseParticle.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1706_restrictionErrorMsg = string.Format(ResXml.Sch_GroupBaseFromAny2, derivedGroupBase.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedGroupBase.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseAny.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseAny.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1781_restrictionErrorMsg = string.Format(ResXml.Sch_ElementFromGroupBase1, derivedElement.QualifiedName.ToString(), derivedElement.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedElement.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1793_restrictionErrorMsg = string.Format(ResXml.Sch_ElementFromGroupBase2, derivedElement.QualifiedName.ToString(), derivedElement.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedElement.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1805_restrictionErrorMsg = string.Format(ResXml.Sch_ElementFromGroupBase3, derivedElement.QualifiedName.ToString(), derivedElement.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedElement.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
3041sb.Append("{" + particle.MinOccurs.ToString(NumberFormatInfo.InvariantInfo) + ", " + particle.MaxOccurs.ToString(NumberFormatInfo.InvariantInfo) + "}");
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (39)
707return value.ToString(null, NumberFormatInfo.InvariantInfo);
717return value.ToString(null, NumberFormatInfo.InvariantInfo);
726return value.ToString(null, NumberFormatInfo.InvariantInfo);
735return value.ToString(null, NumberFormatInfo.InvariantInfo);
744return value.ToString(null, NumberFormatInfo.InvariantInfo);
753return value.ToString(null, NumberFormatInfo.InvariantInfo);
763return value.ToString(null, NumberFormatInfo.InvariantInfo);
773return value.ToString(null, NumberFormatInfo.InvariantInfo);
783return value.ToString(null, NumberFormatInfo.InvariantInfo);
798return value.ToString("R", NumberFormatInfo.InvariantInfo);
813return value.ToString("R", NumberFormatInfo.InvariantInfo);
954return Decimal.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
959if (!Decimal.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
968return Decimal.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
973if (!Decimal.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
986return SByte.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
991if (!SByte.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
1004return Int16.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
1009if (!Int16.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
1022return Int32.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
1027if (!Int32.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
1040return Int64.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
1045if (!Int64.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
1058return Byte.Parse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
1063if (!Byte.TryParse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
1077return UInt16.Parse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
1082if (!UInt16.TryParse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
1096return UInt32.Parse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
1102if (!UInt32.TryParse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
1116return UInt64.Parse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
1121if (!UInt64.TryParse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
1137float f = Single.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, NumberFormatInfo.InvariantInfo);
1158else if (!Single.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, NumberFormatInfo.InvariantInfo, out result))
1178double dVal = Double.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
1199else if (!Double.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, NumberFormatInfo.InvariantInfo, out result))
1219if (Double.TryParse(str, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out d))
1236return Convert.ToDouble(o, NumberFormatInfo.InvariantInfo);
1257return ((double)value).ToString("R", NumberFormatInfo.InvariantInfo);
1265return Convert.ToString(value, NumberFormatInfo.InvariantInfo);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlConverter.cs (6)
347return ulong.Parse(value, NumberStyles.Any, NumberFormatInfo.InvariantInfo);
427static public string ToString(UInt64 value) { return value.ToString(NumberFormatInfo.InvariantInfo); }
802return ToAsciiChars(value.ToString("R", NumberFormatInfo.InvariantInfo), buffer, offset);
811return ToAsciiChars(value.ToString("R", NumberFormatInfo.InvariantInfo), buffer, offset);
816return ToAsciiChars(value.ToString(null, NumberFormatInfo.InvariantInfo), buffer, offset);
821return ToAsciiChars(value.ToString(null, NumberFormatInfo.InvariantInfo), buffer, offset);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlExceptionHelper.cs (8)
129ThrowXmlException(reader, SRSerialization.XmlMaxArrayLengthExceeded, maxArrayLength.ToString(NumberFormatInfo.CurrentInfo));
134ThrowXmlException(reader, SRSerialization.XmlMaxBytesPerReadExceeded, maxBytesPerRead.ToString(NumberFormatInfo.CurrentInfo));
139ThrowXmlException(reader, SRSerialization.XmlMaxNameTableCharCountExceeded, maxNameTableCharCount.ToString(NumberFormatInfo.CurrentInfo));
149ThrowXmlException(reader, SRSerialization.XmlMaxStringContentLengthExceeded, maxStringContentLength.ToString(NumberFormatInfo.CurrentInfo));
244ThrowXmlException(reader, SRSerialization.XmlDictionaryStringIDRange, XmlDictionaryString.MinKey.ToString(NumberFormatInfo.CurrentInfo), XmlDictionaryString.MaxKey.ToString(NumberFormatInfo.CurrentInfo));
249ThrowXmlException(reader, SRSerialization.XmlDictionaryStringIDUndefinedStatic, key.ToString(NumberFormatInfo.CurrentInfo));
254ThrowXmlException(reader, SRSerialization.XmlDictionaryStringIDUndefinedSession, key.ToString(NumberFormatInfo.CurrentInfo));
ILLink.RoslynAnalyzer (1)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Server.HttpSys (1)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Microsoft.CodeAnalysis.CodeStyle (1)
Microsoft.CodeAnalysis.Features (1)
Microsoft.Extensions.Hosting.Systemd (1)
Microsoft.Net.Http.Headers (17)
Microsoft.VisualBasic.Core (56)
Microsoft\VisualBasic\CompilerServices\Conversions.vb (19)
1349Friend Shared Function ToDecimal(ByVal Value As String, ByVal NumberFormat As NumberFormatInfo) As Decimal
1374Friend Shared Function ToDecimal(ByVal Value As Object, ByVal NumberFormat As NumberFormatInfo) As Decimal
1486Private Shared Function ParseDecimal(ByVal Value As String, ByVal NumberFormat As NumberFormatInfo) As Decimal
1487Dim NormalizedNumberFormat As NumberFormatInfo
1523Private Shared Function GetNormalizedNumberFormat(ByVal InNumberFormat As NumberFormatInfo) As NumberFormatInfo
1528Dim OutNumberFormat As NumberFormatInfo
1569OutNumberFormat = DirectCast(InNumberFormat.Clone, NumberFormatInfo)
1585Friend Shared Function ToSingle(ByVal Value As String, ByVal NumberFormat As NumberFormatInfo) As Single
1615Friend Shared Function ToSingle(ByVal Value As Object, ByVal NumberFormat As NumberFormatInfo) As Single
1735Friend Shared Function ToDouble(ByVal Value As String, ByVal NumberFormat As NumberFormatInfo) As Double
1759Friend Shared Function ToDouble(ByVal Value As Object, ByVal NumberFormat As NumberFormatInfo) As Double
1881Dim NumberFormat As NumberFormatInfo
1882Dim NormalizedNumberFormat As NumberFormatInfo
1930Private Shared Function ParseDouble(ByVal Value As String, ByVal NumberFormat As NumberFormatInfo) As Double
1931Dim NormalizedNumberFormat As NumberFormatInfo
2206Public Shared Shadows Function ToString(ByVal Value As Single, ByVal NumberFormat As NumberFormatInfo) As String
2210Public Shared Shadows Function ToString(ByVal Value As Double, ByVal NumberFormat As NumberFormatInfo) As String
2234Public Shared Shadows Function ToString(ByVal Value As Decimal, ByVal NumberFormat As NumberFormatInfo) As String
mscorlib (1)
netstandard (1)
PresentationBuildTasks (2)
PresentationCore (5)
PresentationFramework (38)
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (14)
198part.NameValuePairs.Add(TextSelectionProcessor.CountAttribute, 1.ToString(NumberFormatInfo.InvariantInfo));
199part.NameValuePairs.Add(TextSelectionProcessor.SegmentAttribute + 0.ToString(NumberFormatInfo.InvariantInfo), ",,,");
203part.NameValuePairs.Add(TextSelectionProcessor.CountAttribute, fp.Segments.Count.ToString(NumberFormatInfo.InvariantInfo));
210value += fp.Segments[i].Start.X.ToString(NumberFormatInfo.InvariantInfo) + TextSelectionProcessor.Separator + fp.Segments[i].Start.Y.ToString(NumberFormatInfo.InvariantInfo);
219value += fp.Segments[i].End.X.ToString(NumberFormatInfo.InvariantInfo) + TextSelectionProcessor.Separator + fp.Segments[i].End.Y.ToString(NumberFormatInfo.InvariantInfo);
226part.NameValuePairs.Add(TextSelectionProcessor.SegmentAttribute + i.ToString(NumberFormatInfo.InvariantInfo), value);
304int count = Int32.Parse(stringCount, NumberFormatInfo.InvariantInfo);
495string segmentValue = locatorPart.NameValuePairs[TextSelectionProcessor.SegmentAttribute + segmentNumber.ToString(NumberFormatInfo.InvariantInfo)];
497throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.SegmentAttribute + segmentNumber.ToString(NumberFormatInfo.InvariantInfo)));
503throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.SegmentAttribute + segmentNumber.ToString(NumberFormatInfo.InvariantInfo)));
520double x = double.Parse(xValue, NumberFormatInfo.InvariantInfo);
521double y = double.Parse(yValue, NumberFormatInfo.InvariantInfo);
System.ComponentModel.TypeConverter (39)
System.Data.Common (13)
System\Data\Filter\ConstNode.cs (11)
34_val = Convert.ToDouble(constant, NumberFormatInfo.InvariantInfo);
126if (decimal.TryParse(sval, NumberStyles.Number, NumberFormatInfo.InvariantInfo, out r12))
132if (double.TryParse(sval, NumberStyles.Float | NumberStyles.AllowThousands, NumberFormatInfo.InvariantInfo, out r8))
144return convertible.ToDecimal(NumberFormatInfo.InvariantInfo);
164return convertible.ToDouble(NumberFormatInfo.InvariantInfo);
200if (int.TryParse(sval, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out i4))
205if (long.TryParse(sval, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out i8))
210if (double.TryParse(sval, NumberStyles.Float | NumberStyles.AllowThousands, NumberFormatInfo.InvariantInfo, out r8))
222return convertible.ToInt32(NumberFormatInfo.InvariantInfo);
243return convertible.ToInt64(NumberFormatInfo.InvariantInfo);
264return convertible.ToDouble(NumberFormatInfo.InvariantInfo);
System.Drawing.Primitives (3)
System.Globalization (1)
System.Net.Http (14)
System.Net.NameResolution (1)
System.Net.Primitives (6)
System.Net.Requests (19)
System\Net\FtpControlStream.cs (14)
839port.ToString(NumberFormatInfo.InvariantInfo) +
911return Convert.ToInt64(parsedList[1], NumberFormatInfo.InvariantInfo);
932int year = int.Parse(dateTimeLine.Slice(0, 4), NumberFormatInfo.InvariantInfo);
933int month = short.Parse(dateTimeLine.Slice(4, 2), NumberFormatInfo.InvariantInfo);
934int day = short.Parse(dateTimeLine.Slice(6, 2), NumberFormatInfo.InvariantInfo);
935int hour = short.Parse(dateTimeLine.Slice(8, 2), NumberFormatInfo.InvariantInfo);
936int minute = short.Parse(dateTimeLine.Slice(10, 2), NumberFormatInfo.InvariantInfo);
937int second = short.Parse(dateTimeLine.Slice(12, 2), NumberFormatInfo.InvariantInfo);
941millisecond = short.Parse(strSpan[parts[2]], NumberFormatInfo.InvariantInfo);
1027NumberFormatInfo.InvariantInfo, out result))
1070int port = Convert.ToByte(parsedList[index--], NumberFormatInfo.InvariantInfo);
1071port |= (Convert.ToByte(parsedList[index--], NumberFormatInfo.InvariantInfo) << 8);
1093return Convert.ToInt32(parsedList[3], NumberFormatInfo.InvariantInfo);
1199response.Status = Convert.ToInt16(response.StatusCodeString, NumberFormatInfo.InvariantInfo);
System.Net.Security (1)
System.Private.CoreLib (310)
src\libraries\Common\src\System\Number.Formatting.Common.cs (11)
142internal static unsafe void NumberToString<TChar>(ref ValueListBuilder<TChar> vlb, ref NumberBuffer number, char format, int nMaxDigits, NumberFormatInfo info) where TChar : unmanaged, IUtfChar<TChar>
291internal static unsafe void NumberToStringFormat<TChar>(ref ValueListBuilder<TChar> vlb, ref NumberBuffer number, ReadOnlySpan<char> format, NumberFormatInfo info) where TChar : unmanaged, IUtfChar<TChar>
714private static unsafe void FormatCurrency<TChar>(ref ValueListBuilder<TChar> vlb, ref NumberBuffer number, int nMaxDigits, NumberFormatInfo info) where TChar : unmanaged, IUtfChar<TChar>
884private static unsafe void FormatNumber<TChar>(ref ValueListBuilder<TChar> vlb, ref NumberBuffer number, int nMaxDigits, NumberFormatInfo info) where TChar : unmanaged, IUtfChar<TChar>
911private static unsafe void FormatScientific<TChar>(ref ValueListBuilder<TChar> vlb, ref NumberBuffer number, int nMaxDigits, NumberFormatInfo info, char expChar) where TChar : unmanaged, IUtfChar<TChar>
933private static unsafe void FormatExponent<TChar>(ref ValueListBuilder<TChar> vlb, NumberFormatInfo info, int value, char expChar, int minDigits, bool positiveSign) where TChar : unmanaged, IUtfChar<TChar>
957private static unsafe void FormatGeneral<TChar>(ref ValueListBuilder<TChar> vlb, ref NumberBuffer number, int nMaxDigits, NumberFormatInfo info, char expChar, bool suppressScientific) where TChar : unmanaged, IUtfChar<TChar>
1011private static unsafe void FormatPercent<TChar>(ref ValueListBuilder<TChar> vlb, ref NumberBuffer number, int nMaxDigits, NumberFormatInfo info) where TChar : unmanaged, IUtfChar<TChar>
1179private static int[] NumberGroupSizes(this NumberFormatInfo info) => info._numberGroupSizes;
1181private static int[] CurrencyGroupSizes(this NumberFormatInfo info) => info._currencyGroupSizes;
1183private static int[] PercentGroupSizes(this NumberFormatInfo info) => info._percentGroupSizes;
src\libraries\System.Private.CoreLib\src\System\AppContextConfigHelper.cs (9)
42&& uint.TryParse(str, NumberStyles.HexNumber, NumberFormatInfo.InvariantInfo, out uint resultUnsigned))
75result = int.Parse(str, NumberStyles.AllowLeadingSign, NumberFormatInfo.InvariantInfo);
79result = convertible.ToInt32(NumberFormatInfo.InvariantInfo);
115result = int.Parse(str, NumberStyles.AllowLeadingSign, NumberFormatInfo.InvariantInfo);
145&& uint.TryParse(str, NumberStyles.HexNumber, NumberFormatInfo.InvariantInfo, out uint resultUnsigned))
185result = short.Parse(str, NumberStyles.AllowLeadingSign, NumberFormatInfo.InvariantInfo);
189result = convertible.ToInt16(NumberFormatInfo.InvariantInfo);
225result = short.Parse(str, NumberStyles.AllowLeadingSign, NumberFormatInfo.InvariantInfo);
255&& ushort.TryParse(str, NumberStyles.HexNumber, NumberFormatInfo.InvariantInfo, out ushort resultUnsigned))
src\libraries\System.Private.CoreLib\src\System\Byte.cs (10)
110NumberFormatInfo.ValidateParseStyleInteger(style);
111return Number.ParseBinaryInteger<char, byte>(s, style, NumberFormatInfo.GetInstance(provider));
126NumberFormatInfo.ValidateParseStyleInteger(style);
133return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
138NumberFormatInfo.ValidateParseStyleInteger(style);
139return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
1170NumberFormatInfo.ValidateParseStyleInteger(style);
1171return Number.ParseBinaryInteger<byte, byte>(utf8Text, style, NumberFormatInfo.GetInstance(provider));
1177NumberFormatInfo.ValidateParseStyleInteger(style);
1178return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (16)
484return Number.FormatDecimal(this, null, NumberFormatInfo.CurrentInfo);
489return Number.FormatDecimal(this, format, NumberFormatInfo.CurrentInfo);
494return Number.FormatDecimal(this, null, NumberFormatInfo.GetInstance(provider));
499return Number.FormatDecimal(this, format, NumberFormatInfo.GetInstance(provider));
504return Number.TryFormatDecimal(this, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten);
510return Number.TryFormatDecimal(this, format, NumberFormatInfo.GetInstance(provider), utf8Destination, out bytesWritten);
537NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
538return Number.ParseDecimal(s, style, NumberFormatInfo.GetInstance(provider));
553NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
560return Number.TryParseDecimal(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
565NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
566return Number.TryParseDecimal(s, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
1837NumberFormatInfo.ValidateParseStyleInteger(style);
1838return Number.ParseDecimal(utf8Text, style, NumberFormatInfo.GetInstance(provider));
1844NumberFormatInfo.ValidateParseStyleInteger(style);
1845return Number.TryParseDecimal(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
src\libraries\System.Private.CoreLib\src\System\Double.cs (16)
359return Number.FormatFloat(m_value, null, NumberFormatInfo.CurrentInfo);
364return Number.FormatFloat(m_value, format, NumberFormatInfo.CurrentInfo);
369return Number.FormatFloat(m_value, null, NumberFormatInfo.GetInstance(provider));
374return Number.FormatFloat(m_value, format, NumberFormatInfo.GetInstance(provider));
379return Number.TryFormatFloat(m_value, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten);
385return Number.TryFormatFloat(m_value, format, NumberFormatInfo.GetInstance(provider), utf8Destination, out bytesWritten);
413NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
414return Number.ParseFloat<char, double>(s, style, NumberFormatInfo.GetInstance(provider));
429NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
436return Number.TryParseFloat(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result);
441NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
442return Number.TryParseFloat(s, style, NumberFormatInfo.GetInstance(provider), out result);
2267NumberFormatInfo.ValidateParseStyleInteger(style);
2268return Number.ParseFloat<byte, double>(utf8Text, style, NumberFormatInfo.GetInstance(provider));
2274NumberFormatInfo.ValidateParseStyleInteger(style);
2275return Number.TryParseFloat(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result);
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseCalendar.Nls.cs (3)
175if (!int.TryParse(valueSpan.Slice(0, 4), NumberStyles.None, NumberFormatInfo.InvariantInfo, out int year) ||
176!int.TryParse(valueSpan.Slice(5, 2), NumberStyles.None, NumberFormatInfo.InvariantInfo, out int month) ||
177!int.TryParse(valueSpan.Slice(8, 2), NumberStyles.None, NumberFormatInfo.InvariantInfo, out int day))
src\libraries\System.Private.CoreLib\src\System\Half.cs (16)
357NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
358return Number.ParseFloat<char, Half>(s, style, NumberFormatInfo.GetInstance(provider));
393NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
400return Number.TryParseFloat(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result);
413NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
414return Number.TryParseFloat(s, style, NumberFormatInfo.GetInstance(provider), out result);
508return Number.FormatFloat(this, null, NumberFormatInfo.CurrentInfo);
516return Number.FormatFloat(this, format, NumberFormatInfo.CurrentInfo);
524return Number.FormatFloat(this, null, NumberFormatInfo.GetInstance(provider));
532return Number.FormatFloat(this, format, NumberFormatInfo.GetInstance(provider));
545return Number.TryFormatFloat(this, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten);
551return Number.TryFormatFloat(this, format, NumberFormatInfo.GetInstance(provider), utf8Destination, out bytesWritten);
2314NumberFormatInfo.ValidateParseStyleInteger(style);
2315return Number.ParseFloat<byte, Half>(utf8Text, style, NumberFormatInfo.GetInstance(provider));
2321NumberFormatInfo.ValidateParseStyleInteger(style);
2322return Number.TryParseFloat(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result);
src\libraries\System.Private.CoreLib\src\System\Int128.cs (10)
143NumberFormatInfo.ValidateParseStyleInteger(style);
144return Number.ParseBinaryInteger<char, Int128>(s, style, NumberFormatInfo.GetInstance(provider));
159NumberFormatInfo.ValidateParseStyleInteger(style);
166return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
171NumberFormatInfo.ValidateParseStyleInteger(style);
172return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
2111NumberFormatInfo.ValidateParseStyleInteger(style);
2112return Number.ParseBinaryInteger<byte, Int128>(utf8Text, style, NumberFormatInfo.GetInstance(provider));
2118NumberFormatInfo.ValidateParseStyleInteger(style);
2119return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
src\libraries\System.Private.CoreLib\src\System\Int16.cs (10)
143NumberFormatInfo.ValidateParseStyleInteger(style);
144return Number.ParseBinaryInteger<char, short>(s, style, NumberFormatInfo.GetInstance(provider));
159NumberFormatInfo.ValidateParseStyleInteger(style);
166return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
171NumberFormatInfo.ValidateParseStyleInteger(style);
172return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
1374NumberFormatInfo.ValidateParseStyleInteger(style);
1375return Number.ParseBinaryInteger<byte, short>(utf8Text, style, NumberFormatInfo.GetInstance(provider));
1381NumberFormatInfo.ValidateParseStyleInteger(style);
1382return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
src\libraries\System.Private.CoreLib\src\System\Int32.cs (10)
159NumberFormatInfo.ValidateParseStyleInteger(style);
160return Number.ParseBinaryInteger<char, int>(s, style, NumberFormatInfo.GetInstance(provider));
175NumberFormatInfo.ValidateParseStyleInteger(style);
182return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
187NumberFormatInfo.ValidateParseStyleInteger(style);
188return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
1440NumberFormatInfo.ValidateParseStyleInteger(style);
1441return Number.ParseBinaryInteger<byte, int>(utf8Text, style, NumberFormatInfo.GetInstance(provider));
1447NumberFormatInfo.ValidateParseStyleInteger(style);
1448return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
src\libraries\System.Private.CoreLib\src\System\Int64.cs (10)
156NumberFormatInfo.ValidateParseStyleInteger(style);
157return Number.ParseBinaryInteger<char, long>(s, style, NumberFormatInfo.GetInstance(provider));
172NumberFormatInfo.ValidateParseStyleInteger(style);
179return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
184NumberFormatInfo.ValidateParseStyleInteger(style);
185return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
1443NumberFormatInfo.ValidateParseStyleInteger(style);
1444return Number.ParseBinaryInteger<byte, long>(utf8Text, style, NumberFormatInfo.GetInstance(provider));
1450NumberFormatInfo.ValidateParseStyleInteger(style);
1451return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (46)
333public static unsafe string FormatDecimal(decimal value, ReadOnlySpan<char> format, NumberFormatInfo info)
359public static unsafe bool TryFormatDecimal<TChar>(decimal value, ReadOnlySpan<char> format, NumberFormatInfo info, Span<TChar> destination, out int charsWritten) where TChar : unmanaged, IUtfChar<TChar>
416private static int GetFloatingPointMaxDigitsAndPrecision(char fmt, ref int precision, NumberFormatInfo info, out bool isSignificantDigits)
450static int Slow(char fmt, ref int precision, NumberFormatInfo info, out bool isSignificantDigits)
543public static string FormatFloat<TNumber>(TNumber value, string? format, NumberFormatInfo info)
552public static bool TryFormatFloat<TNumber, TChar>(TNumber value, ReadOnlySpan<char> format, NumberFormatInfo info, Span<TChar> destination, out int charsWritten)
575private static unsafe string? FormatFloat<TNumber, TChar>(ref ValueListBuilder<TChar> vlb, TNumber value, ReadOnlySpan<char> format, NumberFormatInfo info)
695NegativeInt32ToDecStr(value, digits: -1, NumberFormatInfo.GetInstance(provider).NegativeSign);
709NegativeInt32ToDecStr(value, digits, NumberFormatInfo.GetInstance(provider).NegativeSign);
721NumberFormatInfo info = NumberFormatInfo.GetInstance(provider);
755TryNegativeInt32ToDecStr(value, digits: -1, NumberFormatInfo.GetInstance(provider).NegativeSignTChar<TChar>(), destination, out charsWritten);
768TryNegativeInt32ToDecStr(value, digits, NumberFormatInfo.GetInstance(provider).NegativeSignTChar<TChar>(), destination, out charsWritten);
780NumberFormatInfo info = NumberFormatInfo.GetInstance(provider);
835NumberFormatInfo info = NumberFormatInfo.GetInstance(provider);
892NumberFormatInfo info = NumberFormatInfo.GetInstance(provider);
925NegativeInt64ToDecStr(value, digits: -1, NumberFormatInfo.GetInstance(provider).NegativeSign);
939NegativeInt64ToDecStr(value, digits, NumberFormatInfo.GetInstance(provider).NegativeSign);
951NumberFormatInfo info = NumberFormatInfo.GetInstance(provider);
987TryNegativeInt64ToDecStr(value, digits: -1, NumberFormatInfo.GetInstance(provider).NegativeSignTChar<TChar>(), destination, out charsWritten);
1000TryNegativeInt64ToDecStr(value, digits, NumberFormatInfo.GetInstance(provider).NegativeSignTChar<TChar>(), destination, out charsWritten);
1012NumberFormatInfo info = NumberFormatInfo.GetInstance(provider);
1067NumberFormatInfo info = NumberFormatInfo.GetInstance(provider);
1124NumberFormatInfo info = NumberFormatInfo.GetInstance(provider);
1157: NegativeInt128ToDecStr(value, digits: -1, NumberFormatInfo.GetInstance(provider).NegativeSign);
1173: NegativeInt128ToDecStr(value, digits, NumberFormatInfo.GetInstance(provider).NegativeSign);
1185NumberFormatInfo info = NumberFormatInfo.GetInstance(provider);
1220: TryNegativeInt128ToDecStr(value, digits: -1, NumberFormatInfo.GetInstance(provider).NegativeSignTChar<TChar>(), destination, out charsWritten);
1234: TryNegativeInt128ToDecStr(value, digits, NumberFormatInfo.GetInstance(provider).NegativeSignTChar<TChar>(), destination, out charsWritten);
1246NumberFormatInfo info = NumberFormatInfo.GetInstance(provider);
1303NumberFormatInfo info = NumberFormatInfo.GetInstance(provider);
1360NumberFormatInfo info = NumberFormatInfo.GetInstance(provider);
1422NegativeInt32ToDecStr(value, -1, NumberFormatInfo.CurrentInfo.NegativeSign);
1854NegativeInt64ToDecStr(value, -1, NumberFormatInfo.CurrentInfo.NegativeSign);
2280: NegativeInt128ToDecStr(value, -1, NumberFormatInfo.CurrentInfo.NegativeSign);
src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (8)
210internal static TInteger ParseBinaryInteger<TChar, TInteger>(ReadOnlySpan<TChar> value, NumberStyles styles, NumberFormatInfo info)
224internal static ParsingStatus TryParseBinaryInteger<TChar, TInteger>(ReadOnlySpan<TChar> value, NumberStyles styles, NumberFormatInfo info, out TInteger result)
247private static ParsingStatus TryParseBinaryIntegerNumber<TChar, TInteger>(ReadOnlySpan<TChar> value, NumberStyles styles, NumberFormatInfo info, out TInteger result)
268internal static ParsingStatus TryParseBinaryIntegerStyle<TChar, TInteger>(ReadOnlySpan<TChar> value, NumberStyles styles, NumberFormatInfo info, out TInteger result)
754internal static decimal ParseDecimal<TChar>(ReadOnlySpan<TChar> value, NumberStyles styles, NumberFormatInfo info)
890internal static TFloat ParseFloat<TChar, TFloat>(ReadOnlySpan<TChar> value, NumberStyles styles, NumberFormatInfo info)
901internal static ParsingStatus TryParseDecimal<TChar>(ReadOnlySpan<TChar> value, NumberStyles styles, NumberFormatInfo info, out decimal result)
982internal static bool TryParseFloat<TChar, TFloat>(ReadOnlySpan<TChar> value, NumberStyles styles, NumberFormatInfo info, out TFloat result)
src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (16)
274NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
275return Number.ParseFloat<char, BFloat16>(s, style, NumberFormatInfo.GetInstance(provider));
310NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
317return Number.TryParseFloat(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result);
330NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
331return Number.TryParseFloat(s, style, NumberFormatInfo.GetInstance(provider), out result);
394public override string ToString() => Number.FormatFloat(this, null, NumberFormatInfo.CurrentInfo);
401return Number.FormatFloat(this, format, NumberFormatInfo.CurrentInfo);
409return Number.FormatFloat(this, null, NumberFormatInfo.GetInstance(provider));
417return Number.FormatFloat(this, format, NumberFormatInfo.GetInstance(provider));
430return Number.TryFormatFloat(this, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten);
436return Number.TryFormatFloat(this, format, NumberFormatInfo.GetInstance(provider), utf8Destination, out bytesWritten);
2091NumberFormatInfo.ValidateParseStyleInteger(style);
2092return Number.ParseFloat<byte, BFloat16>(utf8Text, style, NumberFormatInfo.GetInstance(provider));
2098NumberFormatInfo.ValidateParseStyleInteger(style);
2099return Number.TryParseFloat(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result);
src\libraries\System.Private.CoreLib\src\System\SByte.cs (10)
146NumberFormatInfo.ValidateParseStyleInteger(style);
147return Number.ParseBinaryInteger<char, sbyte>(s, style, NumberFormatInfo.GetInstance(provider));
162NumberFormatInfo.ValidateParseStyleInteger(style);
169return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
174NumberFormatInfo.ValidateParseStyleInteger(style);
175return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
1337NumberFormatInfo.ValidateParseStyleInteger(style);
1338return Number.ParseBinaryInteger<byte, sbyte>(utf8Text, style, NumberFormatInfo.GetInstance(provider));
1344NumberFormatInfo.ValidateParseStyleInteger(style);
1345return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
src\libraries\System.Private.CoreLib\src\System\Single.cs (16)
354return Number.FormatFloat(m_value, null, NumberFormatInfo.CurrentInfo);
359return Number.FormatFloat(m_value, null, NumberFormatInfo.GetInstance(provider));
364return Number.FormatFloat(m_value, format, NumberFormatInfo.CurrentInfo);
369return Number.FormatFloat(m_value, format, NumberFormatInfo.GetInstance(provider));
374return Number.TryFormatFloat(m_value, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten);
380return Number.TryFormatFloat(m_value, format, NumberFormatInfo.GetInstance(provider), utf8Destination, out bytesWritten);
408NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
409return Number.ParseFloat<char, float>(s, style, NumberFormatInfo.GetInstance(provider));
424NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
431return Number.TryParseFloat(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result);
436NumberFormatInfo.ValidateParseStyleFloatingPoint(style);
437return Number.TryParseFloat(s, style, NumberFormatInfo.GetInstance(provider), out result);
2183NumberFormatInfo.ValidateParseStyleInteger(style);
2184return Number.ParseFloat<byte, float>(utf8Text, style, NumberFormatInfo.GetInstance(provider));
2190NumberFormatInfo.ValidateParseStyleInteger(style);
2191return Number.TryParseFloat(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result);
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (10)
145NumberFormatInfo.ValidateParseStyleInteger(style);
146return Number.ParseBinaryInteger<char, UInt128>(s, style, NumberFormatInfo.GetInstance(provider));
161NumberFormatInfo.ValidateParseStyleInteger(style);
168return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
173NumberFormatInfo.ValidateParseStyleInteger(style);
174return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
2146NumberFormatInfo.ValidateParseStyleInteger(style);
2147return Number.ParseBinaryInteger<byte, UInt128>(utf8Text, style, NumberFormatInfo.GetInstance(provider));
2153NumberFormatInfo.ValidateParseStyleInteger(style);
2154return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (10)
138NumberFormatInfo.ValidateParseStyleInteger(style);
139return Number.ParseBinaryInteger<char, ushort>(s, style, NumberFormatInfo.GetInstance(provider));
154NumberFormatInfo.ValidateParseStyleInteger(style);
161return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
166NumberFormatInfo.ValidateParseStyleInteger(style);
167return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
1189NumberFormatInfo.ValidateParseStyleInteger(style);
1190return Number.ParseBinaryInteger<byte, ushort>(utf8Text, style, NumberFormatInfo.GetInstance(provider));
1196NumberFormatInfo.ValidateParseStyleInteger(style);
1197return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (10)
154NumberFormatInfo.ValidateParseStyleInteger(style);
155return Number.ParseBinaryInteger<char, uint>(s, style, NumberFormatInfo.GetInstance(provider));
170NumberFormatInfo.ValidateParseStyleInteger(style);
177return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
182NumberFormatInfo.ValidateParseStyleInteger(style);
183return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
1234NumberFormatInfo.ValidateParseStyleInteger(style);
1235return Number.ParseBinaryInteger<byte, uint>(utf8Text, style, NumberFormatInfo.GetInstance(provider));
1241NumberFormatInfo.ValidateParseStyleInteger(style);
1242return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (10)
153NumberFormatInfo.ValidateParseStyleInteger(style);
154return Number.ParseBinaryInteger<char, ulong>(s, style, NumberFormatInfo.GetInstance(provider));
169NumberFormatInfo.ValidateParseStyleInteger(style);
176return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
181NumberFormatInfo.ValidateParseStyleInteger(style);
182return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
1227NumberFormatInfo.ValidateParseStyleInteger(style);
1228return Number.ParseBinaryInteger<byte, ulong>(utf8Text, style, NumberFormatInfo.GetInstance(provider));
1234NumberFormatInfo.ValidateParseStyleInteger(style);
1235return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
System.Private.DataContractSerialization (38)
System\Xml\XmlConverter.cs (6)
314return ulong.Parse(value, NumberStyles.Integer, NumberFormatInfo.InvariantInfo);
393public static string ToString(ulong value) { return value.ToString(NumberFormatInfo.InvariantInfo); }
762return ToAsciiChars(value.ToString("R", NumberFormatInfo.InvariantInfo), buffer, offset);
771return ToAsciiChars(value.ToString("R", NumberFormatInfo.InvariantInfo), buffer, offset);
776return ToAsciiChars(value.ToString(null, NumberFormatInfo.InvariantInfo), buffer, offset);
781return ToAsciiChars(value.ToString(null, NumberFormatInfo.InvariantInfo), buffer, offset);
System\Xml\XmlExceptionHelper.cs (9)
140ThrowXmlException(reader, SR.XmlMaxArrayLengthExceeded, maxArrayLength.ToString(NumberFormatInfo.CurrentInfo));
146ThrowXmlException(reader, SR.XmlMaxArrayLengthOrMaxItemsQuotaExceeded, maxQuota.ToString(NumberFormatInfo.CurrentInfo));
152ThrowXmlException(reader, SR.XmlMaxBytesPerReadExceeded, maxBytesPerRead.ToString(NumberFormatInfo.CurrentInfo));
164ThrowXmlException(reader, SR.XmlMaxStringContentLengthExceeded, maxStringContentLength.ToString(NumberFormatInfo.CurrentInfo));
170ThrowXmlException(reader, SR.XmlMaxNameTableCharCountExceeded, maxNameTableCharCount.ToString(NumberFormatInfo.CurrentInfo));
283ThrowXmlException(reader, SR.XmlDictionaryStringIDRange, XmlDictionaryString.MinKey.ToString(NumberFormatInfo.CurrentInfo), XmlDictionaryString.MaxKey.ToString(NumberFormatInfo.CurrentInfo));
289ThrowXmlException(reader, SR.XmlDictionaryStringIDUndefinedStatic, key.ToString(NumberFormatInfo.CurrentInfo));
295ThrowXmlException(reader, SR.XmlDictionaryStringIDUndefinedSession, key.ToString(NumberFormatInfo.CurrentInfo));
System.Private.Xml (97)
System\Xml\Schema\SchemaSetCompiler.cs (24)
1583_restrictionErrorMsg = SR.Format(SR.Sch_SeqFromAll, derivedParticle.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedParticle.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseParticle.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseParticle.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1617_restrictionErrorMsg = SR.Format(SR.Sch_SeqFromChoice, derivedParticle.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedParticle.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseParticle.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseParticle.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1722_restrictionErrorMsg = SR.Format(SR.Sch_GroupBaseFromAny2, derivedGroupBase.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedGroupBase.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseAny.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseAny.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1797_restrictionErrorMsg = SR.Format(SR.Sch_ElementFromGroupBase1, derivedElement.QualifiedName.ToString(), derivedElement.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedElement.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1809_restrictionErrorMsg = SR.Format(SR.Sch_ElementFromGroupBase2, derivedElement.QualifiedName.ToString(), derivedElement.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedElement.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1821_restrictionErrorMsg = SR.Format(SR.Sch_ElementFromGroupBase3, derivedElement.QualifiedName.ToString(), derivedElement.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedElement.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
System\Xml\XmlConvert.cs (34)
616return value.ToString(null, NumberFormatInfo.InvariantInfo);
671return value.ToString("R", NumberFormatInfo.InvariantInfo);
683return value.ToString("R", NumberFormatInfo.InvariantInfo);
802return decimal.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
807if (!decimal.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
817return decimal.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
822if (!decimal.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
833return sbyte.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
838if (!sbyte.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
848return short.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
853if (!short.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
863return int.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
868if (!int.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
878return long.Parse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
883if (!long.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
893return byte.Parse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
898if (!byte.TryParse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
909return ushort.Parse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
914if (!ushort.TryParse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
925return uint.Parse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
930if (!uint.TryParse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
941return ulong.Parse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
946if (!ulong.TryParse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
966float f = float.Parse(value, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, NumberFormatInfo.InvariantInfo);
988if (!float.TryParse(value, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, NumberFormatInfo.InvariantInfo, out result))
1013double dVal = double.Parse(value, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo);
1035if (!double.TryParse(value, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, NumberFormatInfo.InvariantInfo, out result))
1060if (double.TryParse(value, NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out double d))
1074return Convert.ToDouble(o, NumberFormatInfo.InvariantInfo);
1095return d.ToString("R", NumberFormatInfo.InvariantInfo);
1099return Convert.ToString(value, NumberFormatInfo.InvariantInfo);
1658return value.TryFormat(destination, out charsWritten, default, NumberFormatInfo.InvariantInfo);
1718return value.TryFormat(destination, out charsWritten, "R", NumberFormatInfo.InvariantInfo);
1742return value.TryFormat(destination, out charsWritten, "R", NumberFormatInfo.InvariantInfo);
System.Reflection.Metadata (1)
System.Runtime (1)
System.Runtime.Numerics (51)
src\libraries\Common\src\System\Number.Formatting.Common.cs (11)
142internal static unsafe void NumberToString<TChar>(ref ValueListBuilder<TChar> vlb, ref NumberBuffer number, char format, int nMaxDigits, NumberFormatInfo info) where TChar : unmanaged, IUtfChar<TChar>
291internal static unsafe void NumberToStringFormat<TChar>(ref ValueListBuilder<TChar> vlb, ref NumberBuffer number, ReadOnlySpan<char> format, NumberFormatInfo info) where TChar : unmanaged, IUtfChar<TChar>
714private static unsafe void FormatCurrency<TChar>(ref ValueListBuilder<TChar> vlb, ref NumberBuffer number, int nMaxDigits, NumberFormatInfo info) where TChar : unmanaged, IUtfChar<TChar>
884private static unsafe void FormatNumber<TChar>(ref ValueListBuilder<TChar> vlb, ref NumberBuffer number, int nMaxDigits, NumberFormatInfo info) where TChar : unmanaged, IUtfChar<TChar>
911private static unsafe void FormatScientific<TChar>(ref ValueListBuilder<TChar> vlb, ref NumberBuffer number, int nMaxDigits, NumberFormatInfo info, char expChar) where TChar : unmanaged, IUtfChar<TChar>
933private static unsafe void FormatExponent<TChar>(ref ValueListBuilder<TChar> vlb, NumberFormatInfo info, int value, char expChar, int minDigits, bool positiveSign) where TChar : unmanaged, IUtfChar<TChar>
957private static unsafe void FormatGeneral<TChar>(ref ValueListBuilder<TChar> vlb, ref NumberBuffer number, int nMaxDigits, NumberFormatInfo info, char expChar, bool suppressScientific) where TChar : unmanaged, IUtfChar<TChar>
1011private static unsafe void FormatPercent<TChar>(ref ValueListBuilder<TChar> vlb, ref NumberBuffer number, int nMaxDigits, NumberFormatInfo info) where TChar : unmanaged, IUtfChar<TChar>
1186private static int[] NumberGroupSizes(this NumberFormatInfo info) => info.NumberGroupSizes;
1188private static int[] CurrencyGroupSizes(this NumberFormatInfo info) => info.CurrencyGroupSizes;
1190private static int[] PercentGroupSizes(this NumberFormatInfo info) => info.PercentGroupSizes;
System\Number.BigInteger.cs (7)
58internal static ParsingStatus TryParseBigInteger<TChar>(ReadOnlySpan<TChar> value, NumberStyles style, NumberFormatInfo info, out BigInteger result)
79internal static unsafe ParsingStatus TryParseBigIntegerNumber<TChar>(ReadOnlySpan<TChar> value, NumberStyles style, NumberFormatInfo info, out BigInteger result)
125internal static BigInteger ParseBigInteger<TChar>(ReadOnlySpan<TChar> value, NumberStyles style, NumberFormatInfo info)
556private static string? FormatBigIntegerToHex<TChar>(bool targetSpan, BigInteger value, char format, int digits, NumberFormatInfo info, Span<TChar> destination, out int charsWritten, out bool spanSuccess)
741internal static string FormatBigInteger(BigInteger value, string? format, NumberFormatInfo info)
746internal static bool TryFormatBigInteger<TChar>(BigInteger value, ReadOnlySpan<char> format, NumberFormatInfo info, Span<TChar> destination, out int charsWritten)
753private static unsafe string? FormatBigInteger<TChar>(bool targetSpan, BigInteger value, string? formatString, ReadOnlySpan<char> formatSpan, NumberFormatInfo info, Span<TChar> destination, out int charsWritten, out bool spanSuccess)
System\Numerics\BigInteger.cs (18)
676return Parse(value, style, NumberFormatInfo.CurrentInfo);
681return Parse(value, NumberStyles.Integer, NumberFormatInfo.GetInstance(provider));
687return Parse(value.AsSpan(), style, NumberFormatInfo.GetInstance(provider));
692return TryParse(value, NumberStyles.Integer, NumberFormatInfo.CurrentInfo, out result);
697return TryParse(value.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result);
702return Number.ParseBigInteger(MemoryMarshal.Cast<char, Utf16Char>(value), style, NumberFormatInfo.GetInstance(provider));
707return Number.ParseBigInteger(MemoryMarshal.Cast<byte, Utf8Char>(utf8Text), style, NumberFormatInfo.GetInstance(provider));
712return TryParse(value, NumberStyles.Integer, NumberFormatInfo.CurrentInfo, out result);
717return Number.TryParseBigInteger(MemoryMarshal.Cast<char, Utf16Char>(value), style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
722return TryParse(utf8Text, NumberStyles.Integer, NumberFormatInfo.CurrentInfo, out result);
727return Number.TryParseBigInteger(MemoryMarshal.Cast<byte, Utf8Char>(utf8Text), style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK;
1613return Number.FormatBigInteger(this, null, NumberFormatInfo.CurrentInfo);
1618return Number.FormatBigInteger(this, null, NumberFormatInfo.GetInstance(provider));
1623return Number.FormatBigInteger(this, format, NumberFormatInfo.CurrentInfo);
1628return Number.FormatBigInteger(this, format, NumberFormatInfo.GetInstance(provider));
1679string signStr = _sign < 0 ? NumberFormatInfo.CurrentInfo.NegativeSign : "";
1688return Number.TryFormatBigInteger(this, format, NumberFormatInfo.GetInstance(provider), MemoryMarshal.Cast<char, Utf16Char>(destination), out charsWritten);
1693return Number.TryFormatBigInteger(this, format, NumberFormatInfo.GetInstance(provider), MemoryMarshal.Cast<byte, Utf8Char>(utf8Destination), out bytesWritten);
System.Runtime.Serialization.Schema (5)
System.Security.Cryptography.Xml (1)
System.ServiceModel.Primitives (6)
System.ServiceModel.Syndication (1)
System.Windows.Controls.Ribbon (1)
System.Windows.Forms (2)
System.Windows.Forms.Design (3)
System.Windows.Forms.Tests (9)
WindowsBase.Tests (18)