-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
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
Cast to boolean is not working #763
Comments
Can you provide the definition of |
it is a Map<string, object> type.
|
public static bool testCast()
{
Map<string, object> myProperties = new();
myProperties["isExist"] = true;
bool val = (bool)myProperties["isExist"];
bool test1 = val == true ? true : false;
return test1;
} It returns |
I tried your snippet and it indeed returns |
@RawichK Beware that casting can lead to erratic behavior, because C# Neo3 SDK may sometimes be invoked as an
|
Thank you @igormcoelho for the detail explanations. |
Both
test1
andtest2
have falsevalue
.When switching to the disassembly view, the value in
LOC1
is the value1
.So, the
val == true
is boiling down to1 == true
which fails.The text was updated successfully, but these errors were encountered: