Chapter 6. Advanced Language Features

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#.

Threading and Synchronization

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. ...

Get C# for Java Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.