csharplang
csharplang copied to clipboard
[Proposal]: Partial events and constructors (VS 18.0, .NET 10)
Partial events and constructors
- Specification: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-14.0/partial-events-and-constructors.md
- Discussion: https://github.com/dotnet/csharplang/discussions/8064
Summary
Allow the partial modifier on events and constructors to separate declaration and implementation parts,
similar to partial methods and partial properties/indexers.
partial class C
{
partial C(int x, string y);
partial event Action<int, string> MyEvent;
}
partial class C
{
partial C(int x, string y) { }
partial event Action<int, string> MyEvent
{
add { }
remove { }
}
}
Design meetings
https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-11-02.md#partial-properties https://github.com/dotnet/csharplang/blob/main/meetings/2025/LDM-2025-01-22.md#partial-events-and-constructors