-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Related to #3301
Proposal: https://github.com/dotnet/csharplang/blob/master/proposals/csharp-9.0/extending-partial-methods.md
C# 9 introduces a new kind of partial method called an extended partial method. An extended partial method must have both a defining declaration and an implementing declaration.
They are required to have explicit accessibility modifiers, which must be identical on both declarations. They are permitted to have out parameters and to have non-void return types. They are permitted to use the virtual, override, sealed, and new modifiers. Both declarations must contain identical combinations of these modifiers, although they may be present in a different order in each declaration.
A single declaration of an extended partial method is said to be an implementing partial declaration if it has a body or if it has an extern modifier. Only the implementing declaration is permitted to have an extern modifier.