Types in .Net - Part 1
There are primarily two types in .Net:
- Value types
- Reference types.
In this article we will be focusing on Value Types. All Numeric types, Boolean type, Character type etc.. are Value types. .Net framework 2.0 has more than 300 value types. We will be looking at only a few if them. The Numeric Types are used frequently so the C# language as well as VB.Net language provided aliases for them. The following is a partial list of the available Value types in .Net Framework 2.0.
- System.SByte
- System.Byte
- System.Int16
- System.Int32
- System.UInt32
- System.Int64
The above 6 Value types are used for Whole numbers.
- System.Single
- System.Double
- System.Decimal
The above 3 Value types are used for floating point numbers.
- System.Char
- System.Boolean
Value types have a implicit constructor so declaring them instantiates them, no need of using the ‘new’ keyword.
We will cover Nullable’s, User Defined Value Types and Enums in future articles.
April 23rd, 2008 at 9:23 am
[...] .Net Mostly .Net « Types in .Net - Part 1 [...]