The following zip files include examples of basic programs and techniques in Visual C#. The examples are intended to be followed in a linear manner. The code is commented where necessary.
- Very simple "Hello World" program
- Illustrates use of Label and Button controls
- Code illustrates ending a program
- Simple calculator program with four math functions
- Illustrates use of Label, Button, and TextBox controls
- Code shows math functionality and reading/writing values to and from controls
- Introduces variables declared in code
- Simple password program asking user to enter a password
- Introduces If...Then statement to compare entry to a password constant
- List program that generates a list of numbers based on user input
- Introduces ListBox control
- Introduces For...Next loop
- Prime number finder; displays the number of primes found between 1 and n
- Introduces Classes
- Introduces private and public functions
- Uses For...Next loop
- Illustrates use of Messagebox parameters
- Name list program; asks user for name inputs and stores them in a dynamic array
- Resizes array while preserving data each time a user adds a name
- Lists all the names in the array upon command
- Uses For...Next loop
- Uses the Array class and the Sort method to organize the list