Bug? NumberFormat BUG

Cableguy

Expert
Licensed User
Longtime User
I did... After posting this.

Still, shouldn't the IDE recast the Double as string automatically?

When we do:

Dim x as int
x="0.02"
Doesn't x get converted to string automatically?

If this is not true, then a mistype error or alert should be issued.
 

JordiCP

Expert
Licensed User
Longtime User
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.

And the "x" var will still be an int
 
Top