Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal]: Partial events and constructors #9058

Open
jjonescz opened this issue Jan 15, 2025 · 0 comments
Open

[Proposal]: Partial events and constructors #9058

jjonescz opened this issue Jan 15, 2025 · 0 comments
Assignees

Comments

@jjonescz
Copy link
Member

jjonescz commented Jan 15, 2025

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

@dotnet dotnet locked and limited conversation to collaborators Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants