CHAPTER 20Unsafe Code, Pointers, Nullable Types, Dynamic Types, and Miscellaneous Topics
This chapter covers a feature of C# whose name usually takes programmers by surprise: unsafe code. Unsafe code often involves the use of pointers. Together, unsafe code and pointers enable C# to be used to create applications that one might normally associate with C++: high-performance, systems code. Moreover, the inclusion of unsafe code and pointers gives C# capabilities that are lacking in Java.
Also covered in this chapter are nullable types, partial class and partial method definitions, fixed-size buffers, and the new dynamic type. The chapter concludes by discussing the few keywords that have not been covered by the preceding chapters.
Unsafe Code
Get C# 4.0 The Complete Reference 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.