how do i store a really big number?

I am making a clicker game and i am trying to store (up to) a really big number.
i’ve been looking arround on the internet for a couple of HOURS but i just can’t find anything useful.
i saw some stuff about int and int64 and uint and long and double and ulong.
i even saw something about how to chain ints to store large numbers but none of them worked.
i just don’t know what to do anymore…
the maximal number i am trying to store is 1.000.000.000.000.000.000.000.000.000.000
i hope someone can help

none of them worked
Just because you didn’t get it to work does not mean it’s not a (or the) proper way. Chaining ints would work very well.


There is a struct named “BigInteger” in System.Numerics but you’d have to enable .NET 4.6 for that.

The traditional way to store very large numbers is with scientific notation.

For example, the number you mentioned in your question, could be stored as 1 × 10^21

Here is a link to an online scientific notation calculator. In addition to the calculator, they also explain how scientific notation works, and the steps needed to convert a large number to the notation, and how to convert back to the original number.

Hope it helps,
-Larry