Skip to content

Commit a3b91a6

Browse files
authored
Don't imply partial members are optional (#42823)
Fixes #42442 Only a small subset of partial members are optional. Don't imply that they are.
1 parent 1eea038 commit a3b91a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/csharp/language-reference/keywords/partial-member.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ helpviewer_keywords:
99
---
1010
# Partial member (C# Reference)
1111

12-
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:
12+
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:
1313

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

0 commit comments

Comments
 (0)