Chapter 17. Learning About Other C# Techniques

This last chapter in the book is about tying up loose ends. The techniques discussed in this chapter are those that you will use in specific situations. This chapter covers the following topics:

  • How to use arithmetic operators to manipulate numbers

  • How to overload operators

  • When you might use the goto statement

  • How to use .NET generics constraints

  • How to use nullable types

  • How to use partial classes and methods

Operators

You have seen various operators used in examples throughout the book, such as the assignment operator (a = 3;), and the logical operators (if( a == b)). C# has many more arithmetic operators that you can use to process types. You can also define custom operators

Using Arithmetic Operators ...

Get Beginning C# 2008: From Novice to Professional now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.