Skip to content

[Proposal]: Partial events and constructors (VS 18.0, .NET 10) #9058

@jjonescz

Description

@jjonescz

Partial events and constructors

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

Metadata

Metadata

Assignees

Labels

Implemented Needs ECMA SpecThis feature has been implemented in C#, but still needs to be merged into the ECMA specificationProposal champion

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions