This chapter explores some advanced features of the C# language, including exception handling, attributes, preprocessor directives, and unsafe code. Although the Java programmer will be familiar with exception handling, many of these features have no analog in Java and demonstrate the strong C/C++ heritage of C#.
C# and Microsoft .NET provide a richer set of threading and synchronization capabilities than Java. As with Java, most of these capabilities are exposed through the class libraries, not the language syntax. The lock keyword is the only C# statement related to threading and synchronization. See the Statements section in Chapter 4, for a complete description of the lock statement.
For complete coverage of threading and synchronization, see Chapter 13.