New C# Features every developer should know

C# is always evolving and in its 11th version as at writing. Many features has been introduced and improved, and today I am going to discuss about the new C# features every developer should know.

1. The Raw string literal

The raw string literal is a new feature in C# 11 that does string formatting in a new way by starting and ending the string with a three double quote. In previous version of c#, this is only possible by using string concatenation or the @ sign.

Using the “+” or “@” sign can make coding difficult because you have to be observing where to put the “+” sign or how to do escaping. With the raw string literal feature, you don’t have to worry about that because it is easy to start writing strings in-between the three double quote that support the “string interpolation” and you can also define “quotes” within it.

Website