Link to home
Start Free TrialLog in
Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America

asked on

Storing really large numbers in C#

I have this:

 this.button1.Text = DateTime.Now.Ticks.ToString();


which gives me numbers like:


632855413326400752


what I want to do is store this number, not in a text box, but in a variable whose type is large enough to store this value.


I don't know of any variable large enough to store this number.


What options do I have?
Avatar of Tom Knowlton
Tom Knowlton
Flag of United States of America image

ASKER

Also, i need an online reference for the C# data types and how large of values can each one hold:  int, long, double, word, etc.
Huh, I guess a "long" does hold a number that big.
ASKER CERTIFIED SOLUTION
Avatar of aaronfeng
aaronfeng

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of _Katka_
_Katka_
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial