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. a beginner's question

a beginner's question

Scheduled Pinned Locked Moved C#
questioncsharpvisual-studioadobehelp
4 Posts 4 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.
  • F Offline
    F Offline
    Forrest Feather
    wrote on last edited by
    #1

    Hi friends: i had such question: i wrote my code in vs.net then i press f5 to view the result of my program,but theres only a flash of the commandline window which disapeared within 0.5 second... Is there any method to view the result while coding with vs.net? I have known the method that write such code as Console.ReadLine() at the end of the code . Is there any other method ? thanks for your help

    G C H 3 Replies Last reply
    0
    • F Forrest Feather

      Hi friends: i had such question: i wrote my code in vs.net then i press f5 to view the result of my program,but theres only a flash of the commandline window which disapeared within 0.5 second... Is there any method to view the result while coding with vs.net? I have known the method that write such code as Console.ReadLine() at the end of the code . Is there any other method ? thanks for your help

      G Offline
      G Offline
      Guinness4Strength
      wrote on last edited by
      #2

      You can either Debug the code, manually run it from the command line, or put in a Thread.Sleep(x) where X is the number of Milisecoinds you want the program (current thread) to pause for. If you use the Thread.Sleep option, you will need to reference the System.Threading library.

      1 Reply Last reply
      0
      • F Forrest Feather

        Hi friends: i had such question: i wrote my code in vs.net then i press f5 to view the result of my program,but theres only a flash of the commandline window which disapeared within 0.5 second... Is there any method to view the result while coding with vs.net? I have known the method that write such code as Console.ReadLine() at the end of the code . Is there any other method ? thanks for your help

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        I do the same. I use

        #if DEBUG
        Console.ReadLine()
        #endif

        So that it only does it in debug builds, and release builds work normally. --Colin Mackay--

        EuroCPian Spring 2004 Get Together[^]

        1 Reply Last reply
        0
        • F Forrest Feather

          Hi friends: i had such question: i wrote my code in vs.net then i press f5 to view the result of my program,but theres only a flash of the commandline window which disapeared within 0.5 second... Is there any method to view the result while coding with vs.net? I have known the method that write such code as Console.ReadLine() at the end of the code . Is there any other method ? thanks for your help

          H Offline
          H Offline
          HAHAHA_NEXT
          wrote on last edited by
          #4

          This is because your main method is finished. At the ned of your program put while(true); But you will have to close the project manually

          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