dotnet / dotnet/dotnet-api-docs
Mention `ParameterInfo.Name` is null when inspecting optimized assembly
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
---
**Issue moved from MicrosoftDocs/feedback#3981**
- Please respond to @elringus.
---
_From @elringus on Tuesday, January 23, 2024 3:00:40 PM_
Currently, docs for `ParameterInfo.Name` mention that the value is null when accessed from a return parameter: https://learn.microsoft.com/en-us/dotnet/api/system.reflection.parameterinfo.name?view=net-8.0#remarks
I've spent quite some time debugging before stumbled upon this issue: https://github.com/dotnet/runtime/issues/73188#issuecomment-1201715264 Which explains that it's also null when inspecting an optimized assembly.
Please add a remark to the docs about this corner case.
Contributor guide
Assessment
This issue has not been assessed yet.