Articles → CSHARP → Biginteger Data Type In C#

Biginteger Data Type In C#






Purpose





Example




using System;
using System.Numerics;

namespace BigIntegerDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("***************************" + Environment.NewLine);
            Console.Write("BigInteger Demo" + Environment.NewLine);
            Console.Write("***************************" + Environment.NewLine);
            Console.Write("Value: ");
            BigInteger bigInteger = BigInteger.Parse("123456789012345678901234567812345678901234567890123456781234567890123456789012345678");
            Console.Write(bigInteger);
            Console.ReadLine();
        }
    }
}



Output


Picture showing the output of BigInteger data type in C#
Click to Enlarge




Posted By  -  Karan Gupta
 
Posted On  -  Sunday, January 29, 2023

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250