Skip to content

Emphasize in the examples that partial classes should (?) / can be in different files #43217

@rogersm-uwosh

Description

@rogersm-uwosh

Type of issue

Other (describe below)

Description

This isn't really an error, but in the examples, you have one partial class written immediately beneath another, with no indication there (you say it elsewhere) that the partial classes can be in different files. If it is true that most people use partial classes in different files, then maybe just a comment to drive the point home might be helpful:

// This might be in file AnExample.cs
public partial class AnExample {

}

// This might be in a second file, ExtraBits.cs
public partial class AnExample {

}

or something like that, hopefully you get the idea.

Page URL

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

Content source URL

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

Document Version Independent Id

5e05ac12-7d29-d144-a49a-e54765343c20

Article author

@BillWagner

Metadata

  • ID: 450a248b-ab3f-ac3f-d3a5-b1e74b3355ba
  • Service: dotnet-csharp
  • Sub-service: fundamentals

Metadata

Metadata

Assignees

No one assigned

    Labels

    dotnet-csharp/svcfundamentals/subsvchelp wantedGood for community contributors to help [up-for-grabs]in-prThis issue will be closed (fixed) by an active pull request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions