Introduction to Variables
A computer receives information from different applications in various forms. Sometimes a
person types it using the keyboard. Sometimes the user clicks the mouse. Sometimes
information comes from another, more complicated source. The idea is that the computer
spends a great deal of its time with various pieces of information. Information provided to the
computer through a program is called datum and the plural is data. Sometimes the word data is
used both for singular and plural items.
Data used by the computer comes and goes regularly as this information changes. For this
reason, such information is called a variable.
When the user enters data in a program, the computer receives it and must store it somewhere
to eventually make it available to the program as needed. For a program used to process
employment applications, the types of information a user would enter into the program are the
name, the residence, the desired salary, years of experience, education level, etc. Because
there can be so much information for the same program, you must specify to the computer
what information you are referring to and when. To do this, each category of piece of
information must have a name.
1. Start Microsoft Visual C# 2008 Express Edition or Microsoft Visual C# 2008 Professional
2. To create a new application, on the Start Page, on the right side of Create, click Project
In the Templates section, click Console Application
4. Change the Name to GeorgetownCleaningServices2 and click OK
To name the variables of your program, you must follow strict rules. In fact, everything else in
your program must have a name. C# uses a series of words, called keywords, for its internal use.
This means that you must avoid naming your objects using one of these keywords. They are:
Besides these keywords, C# has other words that should be reserved only depending on how
and where they are used. These are referred to as contextual keywords and they are: