Learn a comprehensive list of powerful C# language features.
For my courses I tend to write a lot of code snippets. And if there's one thing I love, it is mixing in power features of the C# language.
For example, take a look at the following code:
This is a simple Person class with a FirstName and LastName field, and I have overridden the ToString method. But did you notice all the cool C# language features I used?
- FirstName and LastName are auto-properties
- I am using auto-property initializers to set default values
- The ToString method uses an expression-bodied function
- The ToString method uses string interpolation
- The string interpolation placeholders use null-coalescing operators to handle nulls
If the above is all Greek to you, then you might want to consider brushing up on some of the more powerful C# language features. Chances are, you're typing way too much code right now, code that the C# compiler can produce for you automatically.
This is slowing you down and increases the chance of human error.
"The course surprises me with quick and useful tips that are well explained. I'm learning that there's more to the many familiar C# language constructs than I was aware of. I loved it. Wonderful job Mark. :)"
- Ben Holtzman, course student
In this course I'll teach you 10 advanced language features of C#. You will learn all about the null coalescing operator, auto properties, object initialisers, lambda expressions, and much more!
I will also show you some very cool new language features that were introduced in C# version 6, like the aforementioned string interpolation and expression-bodied functions.
By the end of the course you will be fluent in these lesser-known advanced C# language features, and this will help you write better, cleaner and more compact code.
StartSection Introduction (1:50)
StartThe Null Coalescing Operator (9:27)
StartSoft Typecasts (7:42)
StartAuto Properties (9:08)
StartThree Useful String Methods (5:49)
StartThe Using Statement (15:26)
StartObject And Collection Initializers (7:47)
StartLINQ Query Expressions (10:20)
StartThe Yield Return Statement (6:46)
StartExtension Methods (10:06)
StartLambda Expressions (9:31)
StartSection Recap (9:33)