I have a string like 000000000100
, which I would like to convert to 1.00 and vice versa.
Leading zero will be remove, last two digit is the decimal.
I give more example :
000000001000 <=> 10.00
000000001005 <=> 10.05
000000331150 <=> 3311.50
Below is the code I am trying, it is giving me result without decimal :
amtf = string.Format("{0:0.00}", amt.TrimStart(new char[] {'0'}));
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…