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
rt,zstring类对象在调用Equals与非空对象比较时会抛空。看起来是由于Equals内会将obj转为zstring类并进行非空判定,但重写的!=运算符号直接尝试获取left与right的value导致的
` public override bool Equals(object obj) { if (obj == null) return ReferenceEquals(this, null);
var gstr = obj as zstring; if (gstr != null) return gstr._value == this._value; var str = obj as string; if (str != null) return str == this._value; return false; }`
public static bool operator !=(zstring left, zstring right) { return !(left._value == right._value); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
rt,zstring类对象在调用Equals与非空对象比较时会抛空。看起来是由于Equals内会将obj转为zstring类并进行非空判定,但重写的!=运算符号直接尝试获取left与right的value导致的
` public override bool Equals(object obj)
{
if (obj == null)
return ReferenceEquals(this, null);
public static bool operator !=(zstring left, zstring right) { return !(left._value == right._value); }
The text was updated successfully, but these errors were encountered: