Skip to content

Documentation is incorrect/ambigious #8202

Open
@ErikPhilips

Description

@ErikPhilips

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

States both that:

The following example sets the default value of MyProperty to false.

and

A xref:System.ComponentModel.DefaultValueAttribute will not cause a member to be automatically initialized with the attribute's value. You must set the initial value in your code.

Since the later statement is true, I would suggest updating the previous to:

The following example specifies the default value MyProperty should be false.

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