Monday, May 11, 2009

Negative to Postive Value

converting Negative Value to Pstive value in C#:
string s = "-123.45";
s = Math.Abs(Convert.ToDouble(s)).ToString();
//Output=123.45

No comments: