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
From the course: .NET 9 Maui: Enhanced Features for Cross-Platform Development
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
-
-
-
-
-
-
(Locked)
Params collections4m 6s
-
(Locked)
New lock type and semantics3m 53s
-
(Locked)
New escape sequence: \e1m 48s
-
(Locked)
Method group natural type improvements4m 18s
-
(Locked)
Implicit indexer access in object initializers2m 49s
-
(Locked)
Enable ref locals and unsafe contexts in iterators and async methods3m 55s
-
(Locked)
Enable ref struct types to implement interfaces4m 43s
-
(Locked)
Allow ref struct types as arguments for type parameters in generics5m 50s
-
(Locked)
Partial properties and indexers6m 21s
-
(Locked)
Overload resolution priority4m 4s
-
(Locked)
-
-