No, the casting works on the opposite sense: the "assigned" value ("0.02") can be of a different type variable (in this case, a string) than the variable you assign it to.
As above you assign it to an int, there will be an implicit conversion of (string)"0.02" to (int)0 (I suppose in this case) so it is not incorrect.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.