Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 31st, 2007, 07:25 AM
Authorized User
 
Join Date: Aug 2007
Location: mumbai, maharashtra, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default RoundOff a Double variable to limit

hi,
This is Shakti, I work as a Software Programmer.

This is a small code, but i have found that most programmers search for it. Hence to help them in need i have posted it.

double j=10.222222;
double i=Math.Round(j,2);

//2 is the number of digits after decimal.

//the answer would be 10.22

Software Programmer (ASP.NET),
Mumbai,
India.
__________________
Software Programmer (ASP.NET),
Mumbai,
India.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Limit of String g2000 Classic ASP Basics 0 October 11th, 2005 03:35 PM
Is there a limit to # of datafields in Access? rayncarnation ASP.NET 1.0 and 1.1 Basics 0 October 11th, 2005 09:05 AM
Limit of POST g2000 Classic ASP Basics 2 October 10th, 2005 04:20 AM
upper limit crmpicco Javascript How-To 2 October 4th, 2005 04:02 AM
64K Limit jtrifts SQL Server 2000 1 March 9th, 2005 12:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.