This is a mirror of official site: http://jasper-net.blogspot.com/

BigInteger in C# 4.0

| Wednesday, September 14, 2011
AddReference_thumb1.png?imgmax=800

In C# 4.0 Microsoft has added so many features and I love all most all the features. In today’s post we are going to discuss BigInteger Class. During programming some complex systems often we need a very big numbers. For example if we use some of asymmetrical cryptographic feature which require to use large numbers or we can give simple example of factorial where we sometime reached to limit of data type provided by C# compiler. At that time this BigInteger data type can be very handy. You can store 232 to 264 number in this data type. So its very big and you can copy very very big number in that data type.

So let’s take a simple example to write a factorial program. BigInteger data type comes under System.Numerics namespace. So first we have to add reference to our program to System.Numerics assembly like following.

Read more: DotNetJalps
QR: biginteger-in-c-40.html

Posted via email from Jasper-net

0 comments: