Chapter 1: Starting with the Building Blocks of C#
C# is one of the most widely used general-purpose programming languages. It is a multi-paradigm language that combines object-oriented, imperative, declarative, functional, generic, and dynamic programming. C# is one of the programming languages designed for the Common Language Infrastructure (CLI) platform, which is an open specification developed by Microsoft and standardized by the International Organization for Standardization (ISO) and European Computer Manufacturers Association (ECMA) that describes executable code and a runtime environment to be used on different computer platforms without being rewritten for specific architectures.
Over the years, C# has evolved with powerful features released version by version. The most recent version (at the time of writing) is C# 8, which has introduced several features to empower developers to be more productive. These include nullable reference types, ranges and indices, asynchronous streams, default implementations of interface members, recursive patterns, switch expressions, and many others. You will learn about these features in detail in Chapter 15, New Features of C# 8.
In this chapter, we will introduce you to the language, the .NET Framework, and the basic concepts around them. We have structured the contents of this chapter as follows:
- Learning the history of C#
- Understanding the CLI
- Knowing the .NET family of frameworks
- Assemblies in .NET
- Understanding the basic structure of a C# program
At the end of this chapter, you will learn how to write a Hello World!
program in C#.