Test your knowledge and understanding by answering some questions, get some hands-on practice, and explore the topics covered in this chapter with deeper research.
What type would you choose for the following "numbers"?
A person's telephone number.
A person's height.
A person's age.
A person's salary.
A book's ISBN.
A book's price.
A book's shipping weight.
A country's population.
The number of stars in the Universe.
The number of employees in each of the small or medium businesses in the UK (up to about 50,000 employees per business).
Create a console application project named Ch02_Exercise02
that outputs the number of bytes in memory that each of the following number types use and the minimum and maximum possible values they can have: sbyte
, byte
, short
, ushort
, int
, uint
, long
, ulong
, float
, double
, and decimal
.
Note
Read the online MSDN documentation, available at https://msdn.microsoft.com/en...