Convert string value into decimal with proper decimal points
Posted
by
sharad
on Stack Overflow
See other posts from Stack Overflow
or by sharad
Published on 2012-08-29T09:02:08Z
Indexed on
2012/08/29
9:38 UTC
Read the original article
Hit count: 439
i have value stored in string format & i want to convert into decimal.
ex:
i have 11.10
stored in string format when i try to convert into decimal it give me 11.1
instead of 11.10
.
I tried it by following way
string getnumber="11.10";
decimal decinum=Convert.ToDecimal(getnumber);
i tried this also
decinum.ToString ("#.##");
but it returns string and i want this in decimal.
what could be the solution for this?
© Stack Overflow or respective owner