C# Programming Course
Declaring variables and assigning values to them. A quick introduction to data types.
Procedures and Functions
Creating named blocks of code that can be used and re-used to perform specific tasks.
The scope of variables. Global variables and local variables.
The scope of variables. Global variables and local variables. Passing by value and by reference.
The role of variables. Some of the different jobs that variables perform.
Values that don't change throughout the program.
Some of the different types commonly used in C#.
Records and Fields
Using the C# struct to group related variables.
Making code more readable and restricting method arguments.
Making decisions using
Executing statements and blocks of code multiple times, using
Accessing elements, searching, transforming, adding to and removing from strings.
Declaring and working with arrays.
Writing to and reading from text files.
Searching and Sorting
Linear search and bubble sort.
Validation, Errors and Testing
Validation checks, types of errors and testing strategies.
The best way to learn to program is to program! Follow these extended examples, actually entering the code into Visual C# Express, and see how the programs evolve. Make sure you understand how they work. Try changing parts of the code to see what happens. Can you extend and improve the programs? Keep asking for help with any parts you don't understand.
- Guess the Number Game - Higher or Lower. Game loops, user input and parsing. Random numbers.
- Hangman - Treating strings as arrays. Character arrays.
- A Mini-Contacts Application - Add people to a phonebook. The application uses enumerations, structs, arrays, constants, loops, methods, switch blocks and more.
- Adventure Game Part 1 - Creating a Class as a template for rooms in a maze. Find your way around the adventure, moving from room to room.
- Adventure Game Part 2 - Adding an Item class. Players can now find items in the rooms and pick them up.
- Adventure Game Part 3 - Adding a Challenge class. Players must now find and use items to progress through the adventure game.
- My Pet Dialog - A Windows Forms application. Creating a second form as a dialog. Adding a property to the dialog.
- Moving Images Part 1 - A Windows Forms application. Adding an image to the form in a picture box. Moving the picture box across the form.
- Moving Images Part 2 - Using the arrow keys to move an image around a form.
- Moving Images Part 3 - Using a timer to control the movement of an image around a form.
Flash Demos and Quizzes
These are Flash swf files. They walk through some simple examples. Some will have interactive quiz elements.
These are Quicktime movies, walking through examples in Visual Studio. Broadband required!
Windows Forms Projects
C# Homework and Tests with Answers