Int is perfect for you. You will destroy the memory with decimal, and if you use ONLY 3 decimal places, you can always remember to multiply / divide by 1000.
In any case, it can be tedious if you use it for financial purposes - then still adhere to decimal places.
If you use it for some units, such as duration or length, int is just fine for you, because you can always go from seconds to milliseconds or from meter to millimeter.
It would be helpful if you would explain the desired use.
Also, from the information I see on MSDN, the decimal value is similar to floating point precision, but with greater precision and without rounding.
Next: decimal - 16 bytes, int - 4 bytes
In any case, your int divided by 1000 will have a range of only +/- 2,147,483
EDIT:
I read your comment and you want to use if for files? If so, I don’t see where the decimals come from ... Maybe they are only for display?
Anyway, go to Int64 here.
source share