appendix-a

Appendix A. Notes on C#

 

In this appendix we will

  • Explain some features of C# used in this book that might be unfamiliar to some readers
  • Give examples of similar features in other languages

The C# specification has always begun “C# is a simple, modern, object-oriented and type-safe programming language” and goes on to note that it will be familiar to C, C++ and Java programmers. That’s been mostly true since 2001. Modern, object-oriented and (moderately) type-safe I have no objection to, but any language with an 800+ page specification cannot reasonably be called “simple” anymore. Having been under continual development for over two decades now, it’s also perhaps no longer so familiar to C, C++ and Java programmers as it once was.

This appendix gives a quick overview of some of the features that are used in this book but might not be immediately familiar to the reader, either because they are relatively new features, or because it is not apparent how they relate to similar features in other languages that the reader might be more familiar with.

A.1 Value types and reference types

A.2 Generic types are fully instantiated at runtime

A.3 Nullable types

A.4 Type sugars and record types

A.5 Extension methods

A.6 Sequences, iterators, lambdas and LINQ