Introduction to C# 7 New Features
In this article, I am going to give a brief Introduction to C# 7 New Features. The C# 7 comes with a number of new features which brings a focus on data consumption, code simplification and performance.
I think the biggest C# 7 new features are tuples and pattern matching. Now we can return multiple different or same type of value from a method using the tuples. The pattern matching is the concept which is used to simplifies the code that is conditional on the shape of data. Except for these two C# 7 new features, there are also many other features. In this article, we are going to discuss what are the new Features introduced in C# 7. Please have a look at the following diagram.
Following are the new features that are introduced as part of C# 7
- Out variables and Discards
- Pattern matching
- Digit Separators
- Deconstruction (Splitting Tuples)
- Local functions
- Ref returns and locals
- Generalized async return types
- Expression bodied members
- Throw expressions
- Async main
We are going to discuss each of these new features in details with examples from our upcoming articles. In the next article, I am going to discuss the Out variables in C# 7 with examples.
The most important point that you need to keep in mind is we are going to use Visual Studio 2017 with Dot Net framework 4.7.x. Please be ready with visual studio 2017.