Value Type vs. Ref Type
-
hi, I don't know in which sence that you are asking 'Value Type or Reference Types are fast'. I recommand you to read some C# syntax and C# basics. Value type and reference types are two type of Common Type System. We can say all numeric types are value type and which are stored in stack memory. Variables of reference types, referred to as objects, store references to the actual data. Reference type store data in Managed Heap memory. And the visibility of both types are entirly different. In some cases we need to convert value type to reference type or reverse. So this is also possible. Converting value type data into reference type data is called BOXING. Converting Reference type data into value type data is called UNBOXING. I recommand you to read MSDN or some book which explain the C# language. ************************** S r e e j i t h N a i r **************************;)
-
Objective answer: Value types are faster. Notes: If you have a finite (and preferably short) storage requirement, value types (for example a structure) are your best friends. But use them lavishly and you will end up with a Stack overflow.