Author: Fandi Susanto Language: United States License: Freeware Size: 0 KB Downloads: 20 times
A variable is just a storage for data of values in the program. In
programming world, every variables has a datatype and in most
programming language, C# included, a variable's datatype is determined
when the variable is declared or initialized. There are several ways to
declare a variable:
The first and third example above only declare variables, they don't
assign any value to the variables. An empty variable must be assigned a
value before being read. If an empty variable is read, a runtime error
will occur. While the second and fourth example have already assigned
values to the variables so that the variables are ready to be read. If a
variable is empty when being read, a runtime error will occur.
The datatypes used above are the most common datatype used, int is an
integer, string is a collection of characters, and double is a real
number. We will learn about datatypes in the next part of this tutorial.
A portal that has dedication and concentration in the development of computer programming and more
resource for help people such as open project, jobs, question & answer, additional tools, and many more.
Collection of various kinds of code programming language from desktop to web programming.