vb6 migration - VB.Net VB6.Format() Issues after converting -
having issues after running tool convert vb6.format() vs 2008 code. had statement:
vb6.format(invariable, szformatmask))
that converted this:
invariable.tostring(szformatmask)
the issue being now, when call our function has having issue cannot convert string = "" integer value. invariable object, , szformatmask string in our function. have suggestions not cause issue longer?
add check empty string , change accordingly:
if szformatmask = "" szformatmask = "g" return invariable.tostring( szformatmask )
the 'g' format-string value special in specifies output "general" number format.
(a brief word on code-style: please avoid hungarian notation, e.g. in
, sz
prefixes, , name local variables , parameters using lowercase camelcase
, uppercase camelcase
reserved type members methods , properties.
Comments
Post a Comment