We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
现象一: 例如:在一个类里面定了一个事件 class One { public static event System.Action UserLoginEvent; ..... UserLoginEvent+=MyFun; . .... public void MyFun(int beh) { } }
执行到UserLoginEvent+=MyFun;语句,提示UserLoginEvent为空,暴异常。而是用 UserLoginEvent=MyFun;第一次使用就可以。
现象二: 在上面现象一的基础上,在另外一个类里面。 class Two { .... One.UserLoginEvent+=TheOtherFun; ....
public void TheOtherFun(int beh) { } }
执行到UserLoginEvent+=TheOtherFun;语句,提示UserLoginEvent为空,暴异常.而实际应用中,TheOtherFun函数响应了。 类One在类Two之前就先实例化了。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
现象一:
例如:在一个类里面定了一个事件
class One
{
public static event System.Action UserLoginEvent;
.....
UserLoginEvent+=MyFun;
. ....
public void MyFun(int beh)
{
}
}
执行到UserLoginEvent+=MyFun;语句,提示UserLoginEvent为空,暴异常。而是用
UserLoginEvent=MyFun;第一次使用就可以。
现象二:
在上面现象一的基础上,在另外一个类里面。
class Two
{
....
One.UserLoginEvent+=TheOtherFun;
....
public void TheOtherFun(int beh)
{
}
}
执行到UserLoginEvent+=TheOtherFun;语句,提示UserLoginEvent为空,暴异常.而实际应用中,TheOtherFun函数响应了。
类One在类Two之前就先实例化了。
The text was updated successfully, but these errors were encountered: