I want my program to be configurable what type of int it should use( most likely between int16
and int32
) in order to save space.
I want to determine the type at the beginning of my code, so i just need to change one place instead of change all int16
to int32
.
Could there be something like:
Type myIntType = int16;// or int32
//just change here
.....
.....
//lost of use of myIntType
List<myIntType> arr = new List<myIntType>();
.....
In a small case the int list will hold numbers between 0 and 10,000
so UInt16
should be good.
But for large case the int list will hold numbers between 0 and 1,000,000
so should use Int32
I even wish there could be int20.
And the size of the list could be very large, so space intense.