Skip to content

A small project that takes types as inputs and displays the properties. Useful when working with external numbers as text and you need to declare types in classes.

License

Notifications You must be signed in to change notification settings

jrnker/Proxmea.NumericTypesProperties

Repository files navigation

Proxmea.NumericTypesProperties

A .Net Core console application that takes numeric types as input and displays the properties of them.
Just some playaround code, but very useful when working with external numerical data and you need to determine what data types to use.

Example output

Name Type Is derived Bit size Max precision Max string length Has negative Max value Min value
Byte Byte 8 0 3 255 0
SByte SByte 8 0 4 * 127 -128
short Int16 * 16 0 6 * 32767 -32768
ushort UInt16 * 16 0 5 65535 0
int Int32 * 32 0 11 * 2147483647 -2147483648
uint UInt32 * 32 0 10 4294967295 0
long Int64 * 64 0 20 * 9223372036854770000 -9223372036854770000
ulong UInt64 * 64 0 20 18446744073709500000 0
decimal Decimal * 128 28 30 * 79228162514264300000000000000 -79228162514264300000000000000
float Single * 32 45 40 * 340282346638528000000000000000000000000 -340282346638528000000000000000000000000
double Double * 64 323 310 * 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368 -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368
Decimal Decimal 128 28 30 * 79228162514264300000000000000 -79228162514264300000000000000
Single Single 32 45 40 * 340282346638528000000000000000000000000 -340282346638528000000000000000000000000
Double Double 64 323 310 * 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368 -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368
Int16 Int16 16 0 6 * 32767 -32768
Int32 Int32 32 0 11 * 2147483647 -2147483648
Int64 Int64 64 0 20 * 9223372036854770000 -9223372036854770000
UInt16 UInt16 16 0 5 65535 0
UInt32 UInt32 32 0 10 4294967295 0
UInt64 UInt64 64 0 20 18446744073709500000 0
BigInteger BigInteger 128 0 * -∞

License

MIT License - See license file
Copyright (c) 2020 Proxmea AB, Christoffer Järnåker

About

A small project that takes types as inputs and displays the properties. Useful when working with external numbers as text and you need to declare types in classes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages