[RESOLVED] 2 Questions about Decimals
Hey guys. I got two problems. Firstly, instead of the program saying 0.5 or 0.6 or 0.42703000 all the time I want it to say:
.5
.6
.42703000
Is there a global option for this or atleast a code for me to put into each one?
Second:
I have two arrays. One has about 100 different numbers. When I view the array I want it to have 4 numbers after the decimal at ALL times. For example...
1.4000
2.3500
1.4555
7456.4000
etc... Thanks for any help!
Re: 2 Questions about Decimals
ehh.. I got it. I used this:
ToString(#.0000);
Re: 2 Questions about Decimals
Quote:
Originally Posted by Fromethius
ehh.. I got it. I used this:
ToString(#.0000);
No you didn't.
You used
ToString("#.0000");
:D
Bill
Re: [RESOLVED] 2 Questions about Decimals
That's not going to work if you have more than four decimal places. This will work in all cases:
VB Code:
nyNumber.ToString().TrimStart("0"c)