Home > Software engineering >  Vb.net string turn double failure conversion from string "100.00" to the type is not valid
Vb.net string turn double failure conversion from string "100.00" to the type is not valid

Time:09-24

STemp=Format (CDbl (sTemp), "0.00")
The stemp for string type "100.00", prompt failure on some computers

CodePudding user response:

The.net type String, there seems to be a toxxxx interface methods such as? Need not CDBL function,

Otherwise, you can try use Val () function instead of CDbl (),

CodePudding user response:

Has been resolved, add a val after Cdbl

CodePudding user response:

refer to the second floor woxihuann response:
has been resolved, add a val after Cdbl

Val () is the result of the Double type data, and then "set" a Cdbl () function, don't think unnecessary?
  • Related