Skip to content

The name of the generated event handler is invalid for generics classes. #59935

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


I have a class whch is called "MyClass", which has an event "MyEvent"

When I write the following:
MyClass. MyEvent +=
and press tab-tab to generate the event handler, it generated the follolwing method:
MyClass<MyType>_MyEvent

Which is invalid and causing a lot of errors in the code.

Visual studio should generate a valid name in this case, too.


Original Comments

Feedback Bot on 3/3/2022, 00:58 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEBugDeveloper CommunityThe issue was originally reported on https://developercommunity.visualstudio.comhelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions