Datatypes
Datatypes
The .NET Framework is an integral Windows component that supports building and
running the next generation of applications and XML Web services.
The .NET Framework has two main components: the common language runtime
and the .NET Framework class library.
The common language runtime is the foundation of the .NET Framework. You can
think of the runtime as an agent that manages code at execution time, providing
core services such as memory management, thread management, and remoting,
while also enforcing strict type safety and other forms of code accuracy that
promote security and robustness.
The other main component of the .NET Framework is the Class Library which is a
comprehensive, object-oriented collection of reusable types that you can use to
develop applications ranging from traditional command-line or graphical user
interface (GUI) applications to applications based on the latest innovations provided
by ASP.NET, such as Web Forms and XML Web services.
Variables and Data types
The Variable in a Computer Refers to a place in the computer’s memory where data can be
stored. A Variable can be visualized as a box with a name. The box can contain only a specific
value depending on the Type (i.e. Data type) of the box.
In its roots the Data can be of “Numerical” or “Character” or “Binary” form.
Variable can hold amount of data depending on its size.
All Variables are finally stored on the memory in Binary form, which is the task of the operating
system and the Compiler.
Numerical Data Refers to:
Decimals 0 to 9, Hexadecimals 0 to F and Octal 0 to 7
Note that a Number is referred to as a value on which mathematical calculations can be
done such as Addition, Subtraction, Division, Multiplication and more.
Again the Numerical datatypes are divided into two parts:
Whole Numbers (Numbers that do not have fractional parts 35, 36, 5600, -0988 including
positive, negative and Zero )
and
Real Numbers(Any Number with or without decimal place and of any sign)
Common Numerical Data Types in VB.NET are :
(Whole Number data type)
Character Data Refers to:
Characters: There are in All 256 Characters on the ASCII set, The UNICODE set
contains more characters.
Note that Character includes “a-z”, “A-Z”, “0-9”, “! @#$%^&*()_+=-|{}[]:”;’< >,.?/~`”
Space, Tab, Vertical Tab, Enter, Backspace are also considered characters, they are
called whitespace characters, or non printable characters.
Datatypes in a programming language describes that what type of data a variable can hold . When we
declare a variable, we have to tell the compiler about what type of the data the variable can hold or which
data type the variable belongs to.
Field Information:
CLR Type Structure: The Class library that contains the Datatype
Value Range: The Value range within which it is safe to use these data types, outside which the rounding
effects or spurious value generation will occur.
Object System.Object (class) 4 bytes Any type can be stored in a variable of type Object.
User- (inherits from Depends on Each member of the structure has a range
Defined System.ValueType) implementing determined by its data type and independent of the
Type platform ranges of the other members.
(structure)
A local variable is one that is declared within a procedure. A module variable is declared at
module level, inside the module but not within any procedure internal to that module.
The scope of a variable is the set of all code that can refer to it without qualifying its name.
A variable's scope is determined by where the variable is declared. Code located in a given
region can use the variables defined in that region without having to qualify their names.
When declaring scope, the following rules apply:
• The scope of a module variable is the entire namespace in which the module
is defined.
• The scope of a shared or instance variable is the structure or class in which it
is declared.
• The scope of a local variable is the procedure in which it is declared.
• However, if you declare a local variable within a block, its scope is that block
only. A block is a set of statements terminated by an End, Else, Loop, or Next
statement; for example, a For...Next or If...Then...Else...End If construction.
Declaring Accessibility
6.) Variable Name must be limited to 32 Characters (Although more are permitted )
7.) VB.NET is not Case sensitive so variable "age", "Age","AGE" will be considered the
same which is not in the case of Visual C++ or C# where each variable will considered to be
a different variable.
asddadasasd