create a c# console program jbwyatt.com
programming

  • Translate your algorithm into C#

  • Open Microsoft Visual C# Express (or Visual Studio Professional)
    - Click on the desktop icon   OR   Click Start menu and find



  • New Project / Visual C#/ Console Application
    - Enter Name for Project [Hello] / ok
    - There will be some code there - DELETE that code! (about 15 lines)
    - Now, Enter YOUR Code
  •       class Hello
          {
             static void Main( )
             {
                // variables hold data & info in RAM while program runs
                int x = 10;
                System.Console.Write( "Hello World!" );
                ... 
                ...
          

      CODE ENTERED

  • visual studio



  • Build / Build Solution compiles the program
    - If there ARE syntax errors, message in Error list window at bottom (View/Error list) - F I X !

      SYNTAX ERROR in program (line 12)

  • visual studio



  • Build / Build Solution compiles the program
    - If NO syntax errors, message in Output window at bottom (View/Output)

  •   NO SYNTAX ERROR in program

  • visual studio



  • Execute your newly compiled code and check for LOGIC errors
    - Debug / Start Without Debugging (ctrl-F5) - executes the code (to add button: 'Tools/Customize')
    - Debug / Start Debugging (F5) - executes the code and allows you to stop execution



  • Save Your Project: File / SAVE ALL

      - Only use "SAVE ALL" when saving your project!
    - Verify Name and Choose (and Remember) Location when saving!
    - Check Box called "Create directory for solution"




    TO HAND IN:
    Put in your class account on clarion server - on due date by 10pm
      - fireftp on firefox (cisprod.clarion.edu, 2200, SFTP)
      - username, password
      - CLASS folder under 'courses'

    WHAT TO HAND IN:
      - locate the FOLDER that you created
      - hand in the ENTIRE FOLDER after deleting the bin & obj folders