.Net C# Data Types

Started by sukishan, Jul 11, 2009, 02:28 PM

Previous topic - Next topic

sukishan


Data is physically stored inside cells of memory. This memory could be physical memory (Hard disk) or logical memory (RAM). Any cell of memory is represented with a unique address. This address is more than some combination of numbers or symbols.

   C# language provides for practically all the data types. These types can be divided in three categories: value types, reference types and pointer types.




   There are some more basic concepts to be learnt before the discussion of the data types. This is about variables and constants. A Variable is a named cell of memory used for data storage. A Variable value can be changed anytime. Every variable must have a type and this type must be set before it is used. Qualifying a variable with a type is called as declaration of variable. The type of a variable is the most important aspect and it defines the behavior of variable. All variables can be divided into seven main categories depending on the context of usage:

Static variables
Variable of instance
Array's elements
Parameters given by reference
Parameters given by value
Returned values
Local variables.
   
A good beginning makes a good ending