Skip to content

The summary title should remove file from both the modifier list and the location #49889

@BillWagner

Description

@BillWagner

Type of issue

Other (describe below)

Description

Treating file like other modifiers is misleading. There are two reasons for this:

  • file is permitted only on top-level types. Not on members, or nested types.
  • The text file where a type is declared has no relationship to its access with respect to private, protected and other access modifiers. It's only significant to limit the lexical scope for a file scoped type.

The text is correct, but the summary table currently implies relationships that don't exist.

Another option is to use N/A on many of the cells in the table. I'm less fond of that, because the summary table implies both types and members for the access modifiers.

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/access-modifiers

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/programming-guide/classes-and-structs/access-modifiers.md

Document Version Independent Id

76a389f6-b568-3568-6483-6df440f96f0c

Platform Id

abc641cd-a47f-c2ed-bec7-4e653b0f3fb6

Article author

@BillWagner

Metadata

  • ID: 8121f526-cfe4-091d-d031-2cdc274cd8ee
  • PlatformId: abc641cd-a47f-c2ed-bec7-4e653b0f3fb6
  • Service: dotnet-csharp
  • Sub-service: fundamentals

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions