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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Ctrl+Z character in C#

Ctrl+Z character in C#

Scheduled Pinned Locked Moved C#
csharp
8 Posts 7 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.
  • K Offline
    K Offline
    Kujtim Hyseni
    wrote on last edited by
    #1

    Hello, I must add the Ctrl+Z character to string at the end for my C# program to work properly. Here is the hypotetic code:

    char ctrl_z= 'what to type';
    string the_string = "Text which ends with ctrl+z character" + ctrl_z;

    or

    string ctrl_z= "what to type";
    string the_string = "Text which ends with ctrl+z character" + ctrl_z;

    What to type for char and string declaration of ctrl_z, respectively. SPIRANCA

    RaviBeeR L 2 Replies Last reply
    0
    • K Kujtim Hyseni

      Hello, I must add the Ctrl+Z character to string at the end for my C# program to work properly. Here is the hypotetic code:

      char ctrl_z= 'what to type';
      string the_string = "Text which ends with ctrl+z character" + ctrl_z;

      or

      string ctrl_z= "what to type";
      string the_string = "Text which ends with ctrl+z character" + ctrl_z;

      What to type for char and string declaration of ctrl_z, respectively. SPIRANCA

      RaviBeeR Offline
      RaviBeeR Offline
      RaviBee
      wrote on last edited by
      #2

      char ctrl_z = (char) 26;

      /ravi

      My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

      P R 2 Replies Last reply
      0
      • RaviBeeR RaviBee

        char ctrl_z = (char) 26;

        /ravi

        My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        Someone 1-voted that; I have no idea why... :confused: P.S. Maybe they wanted Unicode char ctrl_z = '\u0026' ; :-D

        RaviBeeR 1 Reply Last reply
        0
        • P PIEBALDconsult

          Someone 1-voted that; I have no idea why... :confused: P.S. Maybe they wanted Unicode char ctrl_z = '\u0026' ; :-D

          RaviBeeR Offline
          RaviBeeR Offline
          RaviBee
          wrote on last edited by
          #4

          Which is why I pay no attention to ratings like "Reputation". :)  I try to help people (when I'm able to) because others have helped me. /ravi

          My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

          T 1 Reply Last reply
          0
          • RaviBeeR RaviBee

            Which is why I pay no attention to ratings like "Reputation". :)  I try to help people (when I'm able to) because others have helped me. /ravi

            My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

            T Offline
            T Offline
            The Man from U N C L E
            wrote on last edited by
            #5

            Well said. It is a shame it is only possible to measure the irrelevant, such as up-votes/down-votes, and number of posts. Only by seeing how helpful someone is could you give a proper rating.

            If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles]  [My Website]

            K 1 Reply Last reply
            0
            • T The Man from U N C L E

              Well said. It is a shame it is only possible to measure the irrelevant, such as up-votes/down-votes, and number of posts. Only by seeing how helpful someone is could you give a proper rating.

              If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles]  [My Website]

              K Offline
              K Offline
              Khaniya
              wrote on last edited by
              #6

              sometimes it is relevant for future use to reader.

              Life's Like a mirror. Smile at it & it smiles back at you.- P Pilgrim So Smile Please

              1 Reply Last reply
              0
              • RaviBeeR RaviBee

                char ctrl_z = (char) 26;

                /ravi

                My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                R Offline
                R Offline
                Rajesh Anuhya
                wrote on last edited by
                #7

                or char ch = (char)(0x1A);

                Rajesh B --> A Poor Workman Blames His Tools <--

                1 Reply Last reply
                0
                • K Kujtim Hyseni

                  Hello, I must add the Ctrl+Z character to string at the end for my C# program to work properly. Here is the hypotetic code:

                  char ctrl_z= 'what to type';
                  string the_string = "Text which ends with ctrl+z character" + ctrl_z;

                  or

                  string ctrl_z= "what to type";
                  string the_string = "Text which ends with ctrl+z character" + ctrl_z;

                  What to type for char and string declaration of ctrl_z, respectively. SPIRANCA

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  To make it compilable and readable use the escape sequence in a character constant thus:

                  string ctrl_z = "\x1A";
                  // or
                  char ctrl_z = '\x1A';

                  It's time for a new signature.

                  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