Can anyone could tell me how to make the double variable to 2 decimal point?
example: double x=65.2226
the result will be x=65.22
Try this:
Code:double x = 65.2226; x = Double.Parse(String.Format("{0:#.##}", x));
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks