O'Reilly logo

C# Primer Plus by Klaus Michelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Review Questions

1:Why are there two ways to categorize the types in C#?
2:Why does C# have other simple types than int?
3:Which kind of attributes distinguish the different types from each other?
4:What does it mean to be a strongly typed language like C#?
5:Is it possible to assign a value of type int to a variable of type short, without an explicit conversion? Why or why not?
6:How do you specify a literal to be of type float?
7:Write a line of code that declares a private instance variable called distance, which is of type float and is initialized to 100.5.
8:A variable of type byte is holding the value 255. The program now attempts to increment the value by one. What happens: If the compiler switch is set to unchecked? If it is set to checked? ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required