Commit 29b218e
Document .NET 11 ConstructorInfo.GetGenericArguments behavior change (#12616)
* Fix MethodBase.GetGenericArguments docs for .NET 11 ConstructorInfo behavior
MethodBase.GetGenericArguments docs claim that the method throws NotSupportedException when invoked on a ConstructorInfo. As of .NET 11, ConstructorInfo overrides this method to return an empty array (dotnet/runtime commit 6f0b75bf277, fixes #128041).
Update the remarks and exception text to describe both behaviors: .NET Framework and .NET 5-10 throw on a ConstructorInfo; .NET 11+ returns an empty array.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Apply suggestion from @jkotas
---------
Co-authored-by: Max Charlamb <maxcharlamb@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>1 parent a616b87 commit 29b218e
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
509 | | - | |
| 509 | + | |
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
515 | | - | |
| 515 | + | |
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
| |||
0 commit comments