dotnet / dotnet/dotnet-api-docs

MethodBase.Invoke virtual dispatch

Open
#9,714 1 comment 0 reactions 1 assignee Claimed by @steveharter View on GitHub
area-System.Reflection Pri3
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

https://github.com/dotnet/dotnet-api-docs/blob/b73ca7ff6c3b123137d442386494d1a74050f52b/xml/System.Reflection/MethodBase.xml#L1074
This says `Invoke(Object, Object[])` is just forwarder to `Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)`. Example section have this text
https://github.com/dotnet/dotnet-api-docs/blob/b73ca7ff6c3b123137d442386494d1a74050f52b/xml/System.Reflection/MethodBase.xml#L1091
`Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)` remarks section contradicts it and says it actually does virtual dispatch.
https://github.com/dotnet/dotnet-api-docs/blob/b73ca7ff6c3b123137d442386494d1a74050f52b/xml/System.Reflection/MethodBase.xml#L1203

----
BTW
https://github.com/dotnet/dotnet-api-docs/blob/b73ca7ff6c3b123137d442386494d1a74050f52b/xml/System.Reflection/MethodBase.xml#L1199
`new Object("SomeString2")` is invalid construct.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.