Skip to content

Conversation

@asaf92
Copy link

@asaf92 asaf92 commented Apr 11, 2022

There have been previous discussions (#447) about whether async void event handlers should raise VSTHRD100 warnings, and the recommended approach in previous issues is to avoid async void for event handlers and use RunAsync instead.

The documentation for VSTHRD100 doesn't address the event handler edge case, and refers to an article that recommends using async void for event handlers. This change addresses it.

This code example has been suggested in this issue by @AArnott :
#447 (comment)

There has been previous discussion about whether async void event handlers should raise VSTHRD100 warnings, and the recommended approach in previous issues is to avoid async void for event handlers and use RunAsync instead.

The documentation for VSTHRD100 doesn't address the event handler edge case, and refers to an article that recommends using async void for event handlers. This change addresses it.

This code example has been suggested in this issue:
#447 (comment)
Copy link
Member

@AArnott AArnott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you.

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.

2 participants