JetBrains Rider 2025.3 Help

Code inspection: Avoid using 'async' for methods and functions with the 'void' return type and a parameter of type 'System.EventArgs'

This inspection identifies cases where the async modifier is used with methods or functions that have a void return type and a parameter of type System.EventArgs. While async void methods are generally discouraged, they are sometimes necessary for event handlers. However, care must still be taken in these scenarios to handle exceptions properly, as unhandled exceptions in such methods cannot be awaited, potentially leading to application crashes.

If possible, consider using Task or Task<T> as the return type of async methods to ensure better exception handling and maintainability.

15 July 2025