Re: Variable type to hold largest whole number
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Fri, 13 Oct 2006 23:16:11 +0100
John <John@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Which variable type (c#) can whole the largest whole number? I know this
sounds silly but as double and decimal are made for numbers with decimals I
am not sure.
Also if anybody knows of any library for .NET that would allow me to deal
with **VERY** large whole numbers.
Well, what are your restrictions? For instance, the range of double is
much greater than the range of decimal, and it will store a bigger
whole number - but it won't store *every* whole number within that
range accurately.
Decimal, however, can never become "inaccurate" at 0DP - in other
words, it will always accurately represent whole numbers, and it can
store any whole number within its range.
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.
- Prev by Date: Re: How to use outlook in .net
- Next by Date: Re: Computer Programmer (Automation and Robotics Software Design) is Needed
- Previous by thread: Re: Variable type to hold largest whole number
- Next by thread: Re: Variable type to hold largest whole number
- Index(es):
Relevant Pages
|