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. .NET (Core and Framework)
  4. C# Console Program Issue

C# Console Program Issue

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharphelpquestion
5 Posts 4 Posters 1 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.
  • V Offline
    V Offline
    Verghese
    wrote on last edited by
    #1

    While executing my C# console program, I'm unable to see the output window (console), it just blinks and exits as if some batch file has been executed.........how can i make the console window stay open till i closes it.........Thanks

    Thanks

    R P 2 Replies Last reply
    0
    • V Verghese

      While executing my C# console program, I'm unable to see the output window (console), it just blinks and exits as if some batch file has been executed.........how can i make the console window stay open till i closes it.........Thanks

      Thanks

      R Offline
      R Offline
      Ray Cassick
      wrote on last edited by
      #2

      Put a Console.ReadKey() in there. This will keep the window open until someone presses a key.


      FFRF[^]


      V 1 Reply Last reply
      0
      • R Ray Cassick

        Put a Console.ReadKey() in there. This will keep the window open until someone presses a key.


        FFRF[^]


        V Offline
        V Offline
        Verghese
        wrote on last edited by
        #3

        thanks buddy............tht did worked.........!!!

        Thanks

        T 1 Reply Last reply
        0
        • V Verghese

          thanks buddy............tht did worked.........!!!

          Thanks

          T Offline
          T Offline
          tasumisra
          wrote on last edited by
          #4

          apart from pressing F5 directly u can go for Ctrl+F5 ... it will work fine ... :)

          vikas da

          1 Reply Last reply
          0
          • V Verghese

            While executing my C# console program, I'm unable to see the output window (console), it just blinks and exits as if some batch file has been executed.........how can i make the console window stay open till i closes it.........Thanks

            Thanks

            P Offline
            P Offline
            Prasanta_Prince
            wrote on last edited by
            #5

            Place onece the following code Console.Read();

            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