Numeric and Boolean Types

  • Adam Freeman


In this chapter, we looked at the numeric and Boolean types that C# supports and the operations you can perform on them. These operations include basic arithmetic, working directly with the binary representation of numbers and, of course, expressing true and false values. You have seen how C# supports literals to make working with these types simpler. We used the numeric literal prefix and suffix features to control type inference and how we can convert between some types implicitly, while other conversions require the cast operator.


Conditional Statement Numeric Type Additional Member Arithmetic Operator Assignment Operator 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Adam Freeman 2010

Authors and Affiliations

  • Adam Freeman

There are no affiliations available

Personalised recommendations