Skip to content

Conversation

oii-nasif
Copy link
Contributor

Fixes #11878

Summary

  • Fixed typo in Type.GetMethod(String) remarks section where BindingFlags.Instance was incorrectly listed twice
  • Corrected text to properly reference BindingFlags.Static or BindingFlags.Instance when explaining how to
    retrieve specific method overloads

Details

The documentation for Type.GetMethod(String) contained a typo in the Remarks section that described how to
handle AmbiguousMatchException when a method is overloaded. The text incorrectly stated:

you can specify a bindingAttr argument of BindingFlags.InstanceOrBindingFlags.Instance.

This has been corrected to:

you can specify a bindingAttr argument of BindingFlags.Static or BindingFlags.Instance.

This change aligns with the context of the sentence, which explains how to distinguish between static and instance
method overloads.

Fixes the issue reported in the docs feedback.

Corrected documentation that incorrectly referenced BindingFlags.Instance twice when describing how to retrieve
  specific methods. The text now correctly suggests using BindingFlags.Static or BindingFlags.Instance to
  distinguish between static and instance method overloads.
@oii-nasif oii-nasif requested a review from a team as a code owner October 3, 2025 19:36
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 3, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Oct 3, 2025
Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

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

Thanks. I think Or might have been capitalized to emphasize that it's an operator, so maybe my suggestion is an improvement?

@gewarren gewarren merged commit a3f9108 into dotnet:main Oct 3, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution Indicates that the PR has been added by a community member needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unclear text in Type.GetMethod(String) remarks?
2 participants