From the course: .NET 9 Maui: Enhanced Features for Cross-Platform Development

Unlock this course with a free trial

Join today to access over 24,400 courses taught by industry experts.

New escape sequence: \e

New escape sequence: \e

- [Instructor] One C# 13 change is rather modest. It's a change to the escape sequences in strings for the escape character to make it easier to use. Microsoft's reasoning for this seems to be simply a bit of syntactic sugar to make using the escape character in a string easier. In the start code for this video, there is a new project called escape test. In this project, we use a simple string with escape characters to make the text red, underline and blink. We can see how this would need to be done before C# 13 with this somewhat hard to remember sequence of characters to represent escape and we can find this under program. And on line two, we see escape character and that's a string you would need to remember before. And let's try running this to see what it would look like. And here it is. Now you might notice it's not actually blinking, and the reason it's not actually blinking is because the windows terminal, by default, does not handle blinking. If we're doing this in maybe a…

Contents