December 2018
Beginner to intermediate
668 pages
15h 30m
English
The largest whole number that can be stored in .NET Standard types that have a C# alias is about eighteen and a half quintillion, stored in an unsigned long.
In Program.cs, add a statement to import System.Numerics, as shown in the following code:
using System.Numerics;
In Main, add statements to output the largest value of ulong, and a number with 30 digits using BigInteger, as shown in the following code:
var largestLong = ulong.MaxValue;WriteLine($"{largestLong,40:N0}");var atomsInTheUniverse = BigInteger.Parse("123456789012345678901234567890");WriteLine($"{atomsInTheUniverse,40:N0}");
Run the console ...
Read now
Unlock full access