This book is an annotated version of the C# Language Standard, created by adding around 400
separate annotations to the complete text of the Standard. The Standard was formally adopted
as ISO Standard 23270:2006 in April 2006 and published in August 2006, and adopted as Ecma
International Standard 334 version 4 in June 2006. Microsoft Visual Studio 2005 (released November
2005) and Novell Mono 1.2 (released fall 2006) implement this version of the Standard, commonly
referred to as C# 2.0.
Like any programming language, the C# language does not exist in isolation. Most C# compilers
target implementations of the Common Language Infrastructure (CLI, Ecma International Standard
335, ISO Standard 23271). Indeed, the design of the language itself has been influenced
by, though is not reliant upon, the CLI, and in particular the C# Standard Library (Annex D) is
defined in terms of the CLI Standard Library. Specific C# systems add further to the environment
in which C# programs execute, such as Microsoft’s System.Windows.Forms and Novell’s Mono.
Math.Prime.
This rich environment surrounding C# and its necessary interaction with it raises the question of
what topics annotations may cover. Most annotations concern the C# language itself or the C#
Standard Library, but some annotations highlight unusual interactions between C# and the CLI
or even the behavior of specific implementations. The annotations range from short illuminating
comments over (hopefully) interesting anecdotes to larger code samples designed to highlight
some of the new features of C# 2.0. Deciding what could be included and what should be omitted
was often difficult, a task kept in check by the publisher’s page limits!
This is a book about the language and its purpose does not include reporting “features” in compiler
versions current at the time of writing. However, we have included a few annotations that
report on such features where we felt the impact was significant enough. Compilers change,
and it is more than likely that the reader will be using more recent versions than were available
during the writing of the book.
Readers will note that the three of us live in different countries and timezones. While Jon fished
local rivers in early summer, Nigel was sitting out a snowstorm. Technology, which worked most
of the time, made this book possible. The main text was created by distributed collaborative
authoring and editing using a special-purpose XML-based Wiki implemented by Jon in Britain
and hosted on a web server by Peter in Copenhagen, Denmark, with backup done to a system
in New Zealand by Nigel. Annotations were contributed from homes, offices, hotels and airports
worldwide; one (§12.3) was even added in-flight over Greenland using wireless from a Scandinavian
Airlines flight. The initial text for the Wiki was created by importing the Word source document
into OpenOffice, exporting it in XML format, and then cleaning up and regularizing the
XML using XSLT (and good text editors!).