According to New Features in C# 6, you should be able to declare strings as such:
var name = "world";
WriteLine("hello, \{name}");
For the output:
hello, world
I have created a new Console application, set the Target Framework to .NET Framework 4.6, and I am getting the error "Unrecognized Escape Sequence"
I am using Visual Studio Ultimate 2015 CTP Version 14.0.22512.0 DP
Resolving The Problem Regex r = new Regex("\(HelloWorld\)"); which generates the Invalid escape sequence error. To re-iterate, the backslash character can be used as an escape sequence for a regular expression in a recognition property or a verification point.
The string interpolation convention changed. It is now using the "$" operator:
var name = "world";
WriteLine($"hello, {name}");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With