The "ESC" character
-
hey guys, i need to check a stirng if it contain the "ESC" character i searched for the representation of this char which was '\e' but when i write this char in the C# code it doesn't recognize it, does anyone knows how to do it?
-
hey guys, i need to check a stirng if it contain the "ESC" character i searched for the representation of this char which was '\e' but when i write this char in the C# code it doesn't recognize it, does anyone knows how to do it?
What do you mean "when i write this char in the C# code"? How do you "write" it? The .NET Framework General Reference states that \e is the escape sequence for the ESC character, but it really matters what your "string" contains, how it's encoded, and how you're searching for the string. How are you searching the string? How is it encoded? This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]
-
What do you mean "when i write this char in the C# code"? How do you "write" it? The .NET Framework General Reference states that \e is the escape sequence for the ESC character, but it really matters what your "string" contains, how it's encoded, and how you're searching for the string. How are you searching the string? How is it encoded? This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]
i ment simply writing a string whith this character as the following: string strTest = "This is a Test\e string" ; the '\e' character should represent an ESC but the compiler doesn't recognize this escape character, any way i found another way which is represnting the ESC as the follwoing: string strTest = "This is a Test\u001B string" ; the '\u001B' match the ESC char. actully u can write the following: char chTest = '\u001B' ; which is totally legal.