#30 – Types, Variables, Values, Instances

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).

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

2 Responses to #30 – Types, Variables, Values, Instances

  1. Pingback: #30 – Types, Variables, Values, Instances (via 2,000 Things You Should Know About C#) « Minimalist way

  2. Pingback: #316 – Declaring and Using Constants « 2,000 Things You Should Know About C#

Leave a comment