Skip to content

Clarify ToString return value when input is null#12676

Merged
gewarren merged 2 commits into
mainfrom
gewarren-patch-3
Jun 1, 2026
Merged

Clarify ToString return value when input is null#12676
gewarren merged 2 commits into
mainfrom
gewarren-patch-3

Conversation

@gewarren
Copy link
Copy Markdown
Contributor

(Hide whitespace changes.)

Fixes #12675.

Copilot AI review requested due to automatic review settings May 29, 2026 17:50
@gewarren gewarren requested a review from a team as a code owner May 29, 2026 17:50
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the ECMA XML documentation for System.Convert.ToString overloads, aiming to clarify what gets returned when the input is null (per #12675), and it also normalizes markdown whitespace in multiple <remarks> sections.

Changes:

  • Updates the <returns> text for Convert.ToString(object, IFormatProvider) to remove the (incorrect) claim that it returns null when value is null.
  • Adjusts parameter/returns docs for Convert.ToString(object) and Convert.ToString(object, IFormatProvider) (currently introducing misleading wording around the null case).
  • Cleans up markdown whitespace/blank lines in many ToString overload remarks blocks.

Comment thread xml/System/Convert.xml
Comment thread xml/System/Convert.xml
Comment thread xml/System/Convert.xml Outdated
Comment thread xml/System/Convert.xml
Comment thread xml/System/Convert.xml
Comment thread xml/System/Convert.xml Outdated
Comment thread xml/System/Convert.xml
Comment thread xml/System/Convert.xml
Comment thread xml/System/Convert.xml Outdated
Comment thread xml/System/Convert.xml
Removed duplicate sentence in Remarks section.
@gewarren gewarren enabled auto-merge (squash) May 29, 2026 18:14
Copy link
Copy Markdown
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

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

This LGTM. Let's :shipit:

@gewarren gewarren merged commit 87249f5 into main Jun 1, 2026
6 checks passed
@gewarren gewarren deleted the gewarren-patch-3 branch June 1, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convert.ToString(object, IFormatProvider) overload docs are misleading

3 participants