Skip to content

Mention ParameterInfo.Name is null when inspecting optimized assembly #9579

Open
@gewarren

Description

@gewarren

Issue moved from MicrosoftDocs/feedback#3981


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: dotnet/runtime#73188 (comment) Which explains that it's also null when inspecting an optimized assembly.

Please add a remark to the docs about this corner case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions