Learning C# Part 1: Creating Your First Program

Written By: Kevin Jordan

- 28 Jun 2006 -
















Description: This series aims to take a beginning programmer to an intermediate level in C#. Topics covered in Part 1 include: a brief intro to the .NET Framework, customizing Visual Studio, the stages of the development process, creating a new Windows application project, using the Forms designer, and running the application.

  1. Intro To .NET and Visual Studio
  2. The Stages of the Development Process
  3. Creating a Windows Application
  4. Using the Forms Designer and Running the App
  5. Aww Man... Not Homework

The Stages of the Development Process

Here's an overview of the coding process. While the bulk of the tutorials will focus on step four, all aspects of the development process will be touched upon, and you should be able to deploy a setup program for your application by the end of the series. Creating an application involves seven steps:

  1. Create a design specification
    Before you write any code, it helps to take a little time to draw up your design ideas. Be sure you run the design by the intended users to make sure that you didn't leave anything out. Having a blueprint will save you tons of time during your actual coding.
  2. Create the user interface
    Creating the interface in Visual Studio is done by dragging items from the Toolbox into a Windows form. When making the user interface it's a good idea to use standard conventions so that way the users should be able to navigate the program without any training.
  3. Set the properties for the user interface objects
    Using the Properties window or the code editor you'll set the properties for each object you added to the form.
  4. Write code to add functionality
    After you've got everything looking pretty, you begin the fun task of adding the functionality that will run in response to an event. Examples of an event are: clicking a button, changing a field, or even moving the mouse. Pick the events you want to respond to and program accordingly.
  5. Test and debug
    A lot more time is spent here then you would probably expect, even for expert programmers. Anytime you make a change to the program, be sure to run some test cases.
  6. Make the executable
    After the project is "complete", you can create a release build that will compile into a stand-alone executable.
  7. Create the setup application
    Finally, Visual Studio provides a Setup Wizard that will automatically create a program that will include all libraries (DLLs) needed to run the program.

    << Previous

    Next >>