In my past blog series, I have tried to explain all new features that shipped with C# 7.0. You can read about that here.
With Visual Studio Update 3 and version 15.3, C# 7.1 has been made available as well. This feature is not available by default and there are many ways you can turn this feature on. I will be writing a blog series on new features of C# 7.1 but before that lets understand how to set up support for 7.1 in visual studio.
There are 3 ways this feature can be enabled:
Way 1 – Changing Project Setting to target latest C# language
Step 1: Right click Project in Visual Studio -> Properties to open Properties Window
style="display:block; text-align:center;"
data-ad-format="fluid"
data-ad-layout="in-article"
data-ad-client="ca-pub-5021110436373536"
data-ad-slot="9215486331">
Step 2: Navigate to Build -> Advanced and change language version to “C# latest minor version (latest)”
Way 2: Directly editing the .csproj file.
This is for advanced developers. You can open the .csproj file in notepad and change the LangVersion to “7.1” or “latest”
Way 3: By Using Light Bulk Intelli-sense Option
Using any language feature supported by C# 7.1 and then selecting any option defined by Light Bulk
Below is list of new features in C# 7.1
style="display:block; text-align:center;"
data-ad-format="fluid"
data-ad-layout="in-article"
data-ad-client="ca-pub-5021110436373536"
data-ad-slot="9215486331">
- Async Main
- Default Literal Expressions
- Inferred Tuple element names
- New Compiler Options i.e. /refout and /refonly
All code samples are available at my GitHub profile
I am a corporate trainer and solution architect and have a great team of software professionals. Please contact in case you need our services by sending email to contact@techprocompsoft.com. Here is our company website .