Answer the question
In order to leave comments, you need to log in
What is the best way to store numbers in C#?
Now there is such a scheme:
1) Numbers are taken from the database and stored in the string variable
2) Other queries are executed (Update, Insert)
3) Numbers are displayed on the screen.
In general, this works for more than one year. But recently, one person told me that I need to convert all numbers to int, since they take up less space.
The numbers are mostly positive from 10,000,000 to 1,000,000,000.
Which is more profitable:
1) store intermediate data as strings.
2) store in int, but always do Int32.Parse (int) and +
These are small things, but I want to do it right.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question