GivenRandy
asked on
gcvt with VB.NET
How would I convert the C function gcvt() to VB.NET?
For example, it is something like this now:
gcvt(myDouble, 5, myString)
Where 5 is the number of digits, not necessarily the number of characters.
For example, it is something like this now:
gcvt(myDouble, 5, myString)
Where 5 is the number of digits, not necessarily the number of characters.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The ToString has many different formats, and if you are looking for the exact gvct, then you could do something like this:
gcvt (1365.249,6,buffer); ===> ToString("N2") or ToString("####.##")
Bob
gcvt (1365.249,6,buffer); ===> ToString("N2") or ToString("####.##")
Bob
ASKER
http://www.cplusplus.com/ref/cstdlib/gcvt.html