**Biginteger class C#** allows us to handle really large integer numbers, much larger then standard int. In order to use it, namespace System.Numerics hasÂ to be included in the current project.

In order to include namespace System.Numerics, just click as follows:

Add Referenceâ†’.NETâ†’System.Numerics

Then include namespace in your project

*using System.Numerics;*

Coding example for **calculate big int numbers in C#** with **Biginteger class C#** is as follows:

*BigInteger number = BigInteger.Pow(10, 10000);*

or if we for example want to find reminder of 10^{10000} divided with 3^{123}

*BigInteger number = BigInteger.Pow(10, 10000);*

* BigInteger a = new BigInteger(Math.Pow(3.0, 123.0));*

* BigInteger remainder;*

*number = BigInteger.DivRem(number, a, out remainder);*

**External links:**

Calculate big int numbers in C# using Biginteger class C# on YouTube

Calculate big int numbers in C# using Biginteger class C# on Stackoverflow

## Leave a Reply