#30 – Types, Variables, Values, Instances
July 17, 2010 2 Comments
In C#, a type dictates what kind of values can be stored in a variable. A variable is a storage location for some data. Every variable is an instance of a specific type and will have a value that can change during the lifetime of a program.
Constants are variables whose values do not change. They also have a specific type.
Expressions resolve to a particular value when they are evaluated. They also have a specific type.
There are a number of built-in types in C# (e.g. int, float) as well as constructs that allow you to create your own types (e.g. class, enum).
Pingback: #30 – Types, Variables, Values, Instances (via 2,000 Things You Should Know About C#) « Minimalist way
Pingback: #316 – Declaring and Using Constants « 2,000 Things You Should Know About C#