Monday, January 19, 2009

What are Types in .NET ?

First thing that need to understand and i.e. Type is something which decides the type of object you have created. All the primitive Types in .NET have fixed sizes and it will be the same size on any system.

Adding more words to Types ,In .NET the object you are going to create,what will be its scope,what will be its limitation,what will be its size and how they can be interoperable is decided by Type.

Simply there are are two distinct groups of data types, Value Type and Reference Type. As per OOps value types are those where state dominates while for reference types behaviour dominates.

For primitive types I will say any data type directly supported by compiler.
e.g. System.Int32 a = new System.Int32(5);

For value type there are certain remarkable points , that are
*The type acts like a primitive type.
*The type doesn't need to inherit from any other type.
*The type will not have any other types derived from it.
-
*Sherlock Holmes

No comments:

Post a Comment