Spice Up Your C# Code With Advanced Language Features
- 2.5 hours on-demand video
- 2 articles
- Full lifetime access
- Access on mobile and TV
- Certificate of Completion
Get your team access to 4,000+ top Udemy courses anytime, anywhere.Try Udemy for Business
- Learn advanced C# language features
- Master Extension Methods
- What does the yield return statement do?
- Use Expression Bodied Properties
- Soft and hard typecasts
- What is an Auto Property Initializer?
- Have fun with Declaration Expressions
- The Null Coalescing Operator
- ... and much more!
The Null Coalescing operator is extremely useful in providing a graceful fallback when there's a null value in an expression. In this lecture I will show you some examples of how you can put this very versatile operator to good use.
Did you know C# has two kinds of typecasts? There's a 'hard' typecast where you put the destination type in parenthesis, and there's the 'soft' typecast that uses the 'as' operator.
In this lecture I will explain the difference between the two, and you will learn several examples of how using soft typecasts can clean up your code.
Auto properties are a really useful feature where the C# compiler automatically creates the complete property getter and setter implementation for you. Which begs the question: why not simply use a public field instead?
In this lecture I will answer that question, and you will learn how to put auto properties to good use.
You're probably familiar with using the 'using' statement to import namespaces. But did you know you can also use this statement to automatically dispose object instances?
In this lecture I'll show you exactly how it's done, and I will also demonstrate two common mistakes when using the 'using' statement.
Have you ever needed to write pages of initialisation code, to set up a collection and fill it with objects? Well, no more! Object and collection initialisers now let you create complex object collections with only a few lines of code.
In this lecture I will show you exactly how it's done.
Did you know there are two ways of writing a LINQ expression? One is by calling extension methods like Where and Select. But the other is by writing your query as an elegant LINQ query expression: a SQL-ish language that's integrated right into C#.
In this lecture I will teach you how to write LINQ queries as query expressions, and I will demonstrate how easy it is to perform complex operations like joins, mixing generators, and even initialising temporary variables within your query.
Extension methods are a very unusual and somewhat controversial feature in C#, where you declare a static method that actually pretend to be instance method instead!
In this lecture I will teach you how to write an extension method, I'll discuss several arguments for and against using them, and I'll show you 5 handy extension methods you can use in your own code.
The Null Conditional operator is a very cool feature that lets you access a field, property or method of an object instance and gracefully handle null values. In this lecture I'll teach you how you can put this operator to good use in your code.
- You need a Windows, Mac or Linux laptop with Microsoft Visual Studio, Xamarin Studio or Monodevelop
- You should be a beginner, intermediate, or advanced C# developer
- That's it!
Updated on November 21, 2017 - added new promo video
In this course I am going to teach you some very cool and advanced C# language features.
How many of you can explain what the yield return statement does? What are the benefits of auto property initializers? And what's an expression bodied function?
If you don't know about these power features, you might be typing way too much code that the C# compiler can produce for you automatically. This is slowing you down and it may reduce the quality of your code.
Let me help you!
In this course I will teach you 10 advanced power features of the C# language. You will learn all about the null coalescing operator, auto properties, object initialisers, lambda expressions, and much more! And I will also show you some very cool new language features that were introduced in C# version 6.
By the end of the course you will be fluent in advanced C#, and this will help you write better, cleaner and more compact code.
Why should you take this course?
You should take this course if you are a beginner or intermediate developer and want to learn advanced features of the C# language. This might seem like a challenge, but all of my lectures are very easy to follow and I explain everything clearly. You'll have no trouble following along.
Or maybe you're preparing for a job interview? The knowledge in this course will help you prepare for any questions they might throw at you.
30 day money-back guarantee
This course comes with an unconditional, Udemy backed, 30-day money-back guarantee. If you are dissatisfied with the course for any reason, simply request a refund and get your full purchase amount back, no questions asked.
This course today contains over 2.5 hours of video content. Enroll now to benefit from the current price and get free lifelong access to all of the content.
- Beginner, intermediate, and advanced C# programmers who want to learn advanced C# language features
- Developers who are about to take a job interview and need to prepare for questions related to the C# language
- Professionals who want to write elegant and compact code in a large C# project