Skip to content

Commit eff36b0

Browse files
authored
Update Complex.ToString to reflect formatting in .NET 8+ (#10125)
Per dotnet/docs#41835, the format from Complex.ToString changed in .NET 8 from (a, b) to <a; b>
1 parent 10f5a5a commit eff36b0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

xml/System.Numerics/Complex.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6816,7 +6816,7 @@ Languages that support custom operators can use the <xref:System.Numerics.Comple
68166816
<format type="text/markdown"><![CDATA[
68176817
68186818
## Remarks
6819-
The default string representation of a complex number displays the number using its Cartesian coordinates in the form `(`*a*`,` *b*`)`, where *a* is the real part of the complex number, and *b* is its imaginary part. Both *a* and *b* are formatted using the general format specifier ("G") and the conventions of the current system culture.
6819+
The default string representation of a complex number displays the number using its Cartesian coordinates in the form `<`*a*`;` *b*`>`, where *a* is the real part of the complex number, and *b* is its imaginary part. Both *a* and *b* are formatted using the general format specifier ("G") and the conventions of the current system culture.
68206820
68216821
68226822
@@ -6889,7 +6889,7 @@ Languages that support custom operators can use the <xref:System.Numerics.Comple
68896889
<format type="text/markdown"><![CDATA[
68906890
68916891
## Remarks
6892-
The string representation of the complex number returned by this method displays the number using its Cartesian coordinates in the form `(`*a*`,` *b*`)`, where *a* is the real part of the complex number, and *b* is its imaginary part. Both *a* and *b* are formatted using the general format specifier ("G") and the conventions of the culture defined by `provider`.
6892+
The string representation of the complex number returned by this method displays the number using its Cartesian coordinates in the form `<`*a*`;` *b*`>`, where *a* is the real part of the complex number, and *b* is its imaginary part. Both *a* and *b* are formatted using the general format specifier ("G") and the conventions of the culture defined by `provider`.
68936893
68946894
The `provider` parameter is an <xref:System.IFormatProvider> implementation. Its <xref:System.IFormatProvider.GetFormat%2A> method returns a <xref:System.Globalization.NumberFormatInfo> object that provides culture-specific information about the format of the real and imaginary numbers in the returned string. If `provider` is `null`, the returned string is formatted using the <xref:System.Globalization.NumberFormatInfo> object of the current culture.
68956895
@@ -6976,7 +6976,7 @@ Languages that support custom operators can use the <xref:System.Numerics.Comple
69766976
<format type="text/markdown"><![CDATA[
69776977
69786978
## Remarks
6979-
The string representation of the complex number returned by this method displays the number using its Cartesian coordinates in the form `(`*a*`,` *b*`)`, where *a* is the real part of the complex number, and *b* is its imaginary part. Both *a* and *b* are formatted using the format string specified by `format`. The `format` parameter can be any valid standard numeric format specifier, or any combination of custom numeric format specifiers. If `format` is equal to <xref:System.String.Empty?displayProperty=nameWithType> or is `null`, the real and imaginary parts of the complex number are formatted with the general format specifier ("G"). If `format` is any other value, the method throws a <xref:System.FormatException>.
6979+
The string representation of the complex number returned by this method displays the number using its Cartesian coordinates in the form `<`*a*`;` *b*`>`, where *a* is the real part of the complex number, and *b* is its imaginary part. Both *a* and *b* are formatted using the format string specified by `format`. The `format` parameter can be any valid standard numeric format specifier, or any combination of custom numeric format specifiers. If `format` is equal to <xref:System.String.Empty?displayProperty=nameWithType> or is `null`, the real and imaginary parts of the complex number are formatted with the general format specifier ("G"). If `format` is any other value, the method throws a <xref:System.FormatException>.
69806980
69816981
The .NET Framework provides extensive formatting support, which is described in greater detail in the following topics:
69826982
@@ -7066,7 +7066,7 @@ Languages that support custom operators can use the <xref:System.Numerics.Comple
70667066
<format type="text/markdown"><![CDATA[
70677067
70687068
## Remarks
7069-
The string representation of the complex number returned by this method displays the number using its Cartesian coordinates in the form `(`*a*`,` *b*`)`, where *a* is the real part of the complex number, and *b* is its imaginary part. Both *a* and *b* are formatted using the format string specified by `format`. The `format` parameter can be any valid standard numeric format specifier, or any combination of custom numeric format specifiers. If `format` is equal to <xref:System.String.Empty?displayProperty=nameWithType> or is `null`, the real and imaginary parts of the complex number are formatted with the general format specifier ("G"). If `format` is any other value, the method throws a <xref:System.FormatException>.
7069+
The string representation of the complex number returned by this method displays the number using its Cartesian coordinates in the form `<`*a*`;` *b*`>`, where *a* is the real part of the complex number, and *b* is its imaginary part. Both *a* and *b* are formatted using the format string specified by `format`. The `format` parameter can be any valid standard numeric format specifier, or any combination of custom numeric format specifiers. If `format` is equal to <xref:System.String.Empty?displayProperty=nameWithType> or is `null`, the real and imaginary parts of the complex number are formatted with the general format specifier ("G"). If `format` is any other value, the method throws a <xref:System.FormatException>.
70707070
70717071
The .NET Framework provides extensive formatting support, which is described in greater detail in the following topics:
70727072

0 commit comments

Comments
 (0)