Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. The "ESC" character

The "ESC" character

Scheduled Pinned Locked Moved C#
csharptutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hercules01
    wrote on last edited by
    #1

    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?

    H 1 Reply Last reply
    0
    • H Hercules01

      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?

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      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]

      H 1 Reply Last reply
      0
      • H Heath Stewart

        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]

        H Offline
        H Offline
        Hercules01
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups