# Learning C# Part 2: Language Fundamentals

### Written By: Kevin Jordan

### - 07 Jul 2006 -

Description: This series aims to take a beginning programmer to an intermediate level in C#. Topics covered in Part 2 include: C# program structure, declaring and intializing variables, characters, strings, constants, enumeration, converting between types, and expressions and operators.

- C# Program Structure
- Declaring and Using Different Variable Types
- Constants and Enumeration
- Converting Variables and Using Expressions
- Aww Man... Not Homework

## Aww Man… Not Homework

So, now you know all about variables in C#. You should be able to declare them, initialize them, perform mathematical operations and a lot of other stuff as well. Time to test that knowledge with a practice problem.

- Use the form designer to create a simple calculator with two input fields. Create a simple calculator that can do addition, subtraction, multiplication, and division on the two fields and output the results.

Hint: Make a button for each mathematical operation and use a click event (by double clicking the button) to perform the math. Be sure to convert the input to a number type.

Yeah, I know this one is a lot tougher than last time, but a calculator (even if this one looks a little wierd) is a real application. If you get this, then this will be you first useful program. If you run into any problems, look to the forums. See you again in Part 3.