Skip to content

Unclear text in Type.GetMethod(String) remarks? #11878

@fterrani

Description

@fterrani

Type of issue

Typo

Description

Greetings.

Below the first code sample of Type.GetMethod(String)'s Remarks section, several solutions to retrieve a specific method are described. The first one, which suggests to use the GetMethod(String, BindingFlags) overload finishes with some text I don't understand:

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

I'm not a Type specialist but I think there might be an issue here. Given the first paragraph of the section:

[...] The search includes public static and public instance methods.

... my guess is that the text should probably have been something like this?

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

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.type.getmethod?view=net-9.0

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System/Type.xml

Document Version Independent Id

73897893-044d-2e74-8754-5761abcf38c5

Platform Id

f34b4296-5999-5a96-fdcd-d3cfea141485

Article author

@dotnet-bot

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions