Thursday 24 May 2012

Value types and Reference types

Value types and Reference types

Here are the key points:
■ The value of a reference type expression (a variable for example) is a reference,
not an object.
■ References are like URLs—they are small pieces of data that let you access the
real information.
■ The value of a value type expression is the actual data.
■ There are times when value types are more efficient than reference types, and
vice versa.
■ Reference type objects are always on the heap, but value type values can be on
either the stack or the heap, depending on context.
■ When a reference type is used as a method parameter, by default the parameter
is passed by value—but the value itself is a reference.
■ Value type values are boxed when reference type behavior is needed; unboxing
is the reverse process.


Post By : Dipen Shah
Blog By : Dipen Shah

1 comment:

  1. Hi,My new site from Web Design Cochin is far superior in every way from my previous website; more eye appealing, more modern looking, better functionality, and far more content. I would highly recommend that anyone wanting a brand new website or an overhaul on an existing site should hire canz design, you will not be disappointed.Thanks........

    ReplyDelete