© Adam Freeman 2016

ADAM FREEMAN, Pro ASP.NET Core MVC , 10.1007/978-1-4842-0397-2_4

4. Essential C# Features

Adam Freeman

(1)Milton Keynes MK6 3PA, UK

In this chapter, I describe C# features used in web application development that are not widely understood or often cause confusion. This is not a book about C#, however, and so I provide only a brief example for each feature so that you can follow the examples in the rest of the book and take advantage of these features in your own projects. Table 4-1 summarizes this chapter.

Table 4-1. Chapter Summary




Avoid accessing properties on null references

Use the null conditional operator


Simplify C# properties

Use automatically implemented properties


Simplify string composition ...

Get Pro ASP.NET Core MVC, Sixth Edition 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.