Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions xml/System.Numerics/Complex.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6816,7 +6816,7 @@ Languages that support custom operators can use the <xref:System.Numerics.Comple
<format type="text/markdown"><![CDATA[

## Remarks
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.
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeffhandley It seems like we should keep the old and new syntax and annotate them with the versions they're applicable to.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I can send a follow up PR, @gewarren. Would the following wording be good? Please feel free to offer refinement to it.

Suggested change
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.
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. In .NET 7 and earlier, the form `(`*a*`, `*b*`)` was used.

Copy link
Contributor

@gewarren gewarren Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
The default string representation of a complex number displays the number using its Cartesian coordinates in the form `<`*a*`;` *b*`>` (or `(`*a*`, `*b*`)` in .NET 7 and earlier versions), 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.

@jeffhandley This would be my recommended wording.




Expand Down Expand Up @@ -6889,7 +6889,7 @@ Languages that support custom operators can use the <xref:System.Numerics.Comple
<format type="text/markdown"><![CDATA[

## Remarks
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`.
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`.

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.

Expand Down Expand Up @@ -6976,7 +6976,7 @@ Languages that support custom operators can use the <xref:System.Numerics.Comple
<format type="text/markdown"><![CDATA[

## Remarks
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>.
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>.

The .NET Framework provides extensive formatting support, which is described in greater detail in the following topics:

Expand Down Expand Up @@ -7066,7 +7066,7 @@ Languages that support custom operators can use the <xref:System.Numerics.Comple
<format type="text/markdown"><![CDATA[

## Remarks
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>.
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>.

The .NET Framework provides extensive formatting support, which is described in greater detail in the following topics:

Expand Down