Is there a data type to store 2^256 big integer numbers in variables in C#? As far as I know it exceeds the limit of BigInt.
Asked
Active
Viewed 154 times
0
-
12^256 does not exceed the limit of BigInteger – harold Feb 01 '20 at 14:10
-
1The `BigInteger` type is an immutable type that represents an arbitrarily large integer whose value in theory has no upper or lower bounds – Pavel Anikhouski Feb 01 '20 at 14:13
-
Yes. there is such data type. – quetzalcoatl Feb 01 '20 at 14:13
-
See: [What is the limit of the Value Type BigInteger in C#?](https://stackoverflow.com/q/21856753/8967612) – 41686d6564 stands w. Palestine Feb 01 '20 at 14:17
1 Answers
6
Assuming that you're talking about exact integers: BigInteger
is arbitrarily large. However, it may also be possible to just use a quad of Int64
, depending on the exact operations you need to perform.

Marc Gravell
- 1,026,079
- 266
- 2,566
- 2,900