Q:

Calculating very large whole numbers

I am trying to compute 2^1000 (2 to the power of 1000) using c#.  I need the value to all places.  I've been scratching my head for a while now because I can't seem to figure out a way to achieve this in c#.
Is there some kind of type that will store a number 300+ digits long, that I'm missing? :)
Thanks

A:

Yes, but only in .NET 4.0 - System.Numerics.BigInteger.
If you can use .NET 4.0, I'd go for that. Otherwise, I'm sure there are third party libraries around. Let me know if you want me to try to find some.

A:

If your goal is to exercise your C# skills on Euler problems, then using a BigInt library seems pointless. If you just need the value of 2^1000 as a step to solving another problem, well, here it is.
10715086071862673209484250490600018105614048117055
33607443750388370351051124936122493198378815695858
12759467291755314682518714528569231404359845775746
98574803934567774824230985421074605062371141877954
18215304647498358194126739876755916554394607706291
4571196477686542167660429831652624386837205668069376

A:

System.Numerics.BigInteger if you're in .net 4.0 (VS 2010)
Or, look for a good bigint implementation on the web - there are many to choose from.
See also this StackOverflow question.

