30 September 2012

BigInteger Data Type introduced in .NET 4

I find one good article which explains about the BigInteger.

Some pointers:

int, int64 and long have size limitation. Assigning a large than they can hold will result in a OverFlowException. But if we have computation requirement which needs no such max limit, we can use the  BigInteger which introduced in .NET 4.

There is no max limit on the BigInteger data type. MSDN says like below:

Because the BigInteger type is immutable (see Mutability and the BigInteger Structure) and because it has no upper or lower bounds, an OutOfMemoryException can be thrown for any operation that causes a BigInteger value to grow too large.

More info can be find from here on MSDN

No comments:

Post a Comment