Skip to content

C# 14: Support for partial event declarations.#21325

Draft
michaelnebel wants to merge 5 commits intogithub:mainfrom
michaelnebel:csharp14/partialmembers
Draft

C# 14: Support for partial event declarations.#21325
michaelnebel wants to merge 5 commits intogithub:mainfrom
michaelnebel:csharp14/partialmembers

Conversation

@michaelnebel
Copy link
Contributor

@michaelnebel michaelnebel commented Feb 13, 2026

In this PR we make support for partial event declarations.

That is, we support event declarations like.

public partial class Partial
{
    public partial event EventHandler MyEvent;
}

public partial class Partial
{
    public partial event EventHandler MyEvent {
        add { ... } 
        remove { ... } 
    }
}

The default add/remove event accessors from the declaring declaration are not extracted. Only the explicit add/remove from the implementation declaration are extracted. Note that a partial event always need to have an implementation declaration.

@github-actions github-actions bot added the C# label Feb 13, 2026
@michaelnebel michaelnebel force-pushed the csharp14/partialmembers branch from a37011f to c29bac2 Compare February 16, 2026 15:13
@michaelnebel michaelnebel changed the title C#: Support for partial constructor- and event declarations. C#: Support for partial event declarations. Feb 16, 2026
@michaelnebel michaelnebel changed the title C#: Support for partial event declarations. C# 14: Support for partial event declarations. Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant