O'Reilly logo

Pro ASP.NET Core MVC 2 by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Adam Freeman 2017

Adam Freeman, Pro ASP.NET Core MVC 2, https://doi.org/10.1007/978-1-4842-3150-0_4

4. Essential C# Features

Adam Freeman

(1)London, UK

In this chapter, I describe C# features used in web application development that are not widely understood or that 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

Problem

Solution

Listing

Avoid accessing properties on null references

Use the null conditional operator

5–8

Simplify C# properties

Use automatically implemented properties

9–11

Simplify string ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required