Skip to content

Commit

Permalink
Don't imply partial members are optional (#42823)
Browse files Browse the repository at this point in the history
Fixes #42442

Only a small subset of partial members are optional. Don't imply that they are.
  • Loading branch information
BillWagner authored Oct 3, 2024
1 parent 1eea038 commit a3b91a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/csharp/language-reference/keywords/partial-member.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ helpviewer_keywords:
---
# Partial member (C# Reference)

A partial member has one *declaring declaration* and often one *implementing declaration*. The *declaring declaration* doesn't include a body. The *implementing declaration* provides the body of the member. Partial members enable class designers to provide member hooks, similar to event handlers, that developers can decide to implement or not. Partial types and members provide a way for human developers to write part of a type while tools write other parts of the type. If the developer doesn't supply an optional implementing declaration, the compiler can remove the declaring declaration at compile time. The following conditions apply to partial members:
A partial member has one *declaring declaration* and often one *implementing declaration*. The *declaring declaration* doesn't include a body. The *implementing declaration* provides the body of the member. Partial members enable class designers to provide member hooks that can be implemented by tooling such as source generators. Partial types and members provide a way for human developers to write part of a type while tools write other parts of the type. If the developer doesn't supply an optional implementing declaration, the compiler can remove the declaring declaration at compile time. The following conditions apply to partial members:

- Declarations must begin with the contextual keyword [partial](../../language-reference/keywords/partial-type.md).
- Signatures in both parts of the partial type must match.
Expand Down

0 comments on commit a3b91a6

Please sign in to comment.