Skip to content

Update docs for CompareExchange\<T> #11422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Update docs for CompareExchange\<T> #11422

wants to merge 2 commits into from

Conversation

gewarren
Copy link
Contributor

@gewarren gewarren commented Jun 9, 2025

Fixes #11419.

Copy link

@Copilot 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 XML documentation for the CompareExchange methods by revising type parameter descriptions and summary texts. Key changes include:

  • Removing the explicit reference type constraint from the type parameter T.
  • Updating summary tags to use consistently.
  • Reformulating the remarks section to streamline the note about method overload preference.
Comments suppressed due to low confidence (2)

xml/System.Threading/Interlocked.xml:1344

  • The removal of the explicit reference type constraint on T may be intentional; consider adding a brief note explaining this change to clarify the updated usage.
<typeparam name="T">The type to be used for <paramref name="location1" />, <paramref name="value" />, and <paramref name="comparand" />.</typeparam>

xml/System.Threading/Interlocked.xml:2380

  • [nitpick] Consider retaining the [!NOTE] markup format for this note to maintain consistency with other documentation sections, if that aligns with the project's style guidelines.
This method overload is preferable to the <xref:System.Threading.Interlocked.Exchange%28System.Object%40%2CSystem.Object%29> method overload, because the latter requires late-bound access to the destination object.

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.

Summary for CompareExchange<T> should not mention reference types as of .NET 9
1 participant