You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
public class Test5
{
public static event EventHandler SomeEvent;
public static void RaiseTheEvent(object sender)
{
var eventHandler = SomeEvent;
if (eventHandler != null)
{
eventHandler(sender, EventArgs.Empty);
}
}
}
Here we get this warning:
The Boolean condition eventHandler != null always evaluates to a constant value. If it (or its negation) appear in the source code....
If no event handler is attached to SomeEvent, it is null.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Here we get this warning:
The Boolean condition eventHandler != null always evaluates to a constant value. If it (or its negation) appear in the source code....
If no event handler is attached to SomeEvent, it is null.
The text was updated successfully, but these errors were encountered: