Tuesday, October 27, 2020 09:39

Table of contents >> Introduction > Variable types

Variable types

When you declare variables in your programs, you must indicate to the compiler the type and the name of the variables. There are many variable types and derivations of them. A type defines the amount of data a variable can store, and the set of operations the program can perform on those data.

C# accepts the following base types:

Additional Information

There are a lot of other derived types of these variables, that are not used as much, or they are used in special cases. While it is unlikely you will be using them any time soon, you should take a look over them to familiarize yourself with their keyword names

The u in some keywords stands for unsigned, meaning that the variable uses the sign bit to further store relevant digits, in which case it can store only positive values or 0.

In the next lesson we will learn how we can give values to our variables.

The concepts explained in this lesson are also shown visually as part of the following video:



Tags: ,

Leave a Reply

Do NOT follow this link or you will be banned from the site!