Programming Tip of the Day – Difference between Value Type and Reference Type

Value type -> A variable which holds data in its location.

Reference Type -> A variable which holds a pointer to another location which holds the data.

Examples in C#:

Numeric variables, structures are value types

String, Arrays, and class are reference types

 

Programming Tip of the Day is brought to you by GUVI.  It is a collection of commonly known, yet commonly made mistakes by developers from time to time.

If you want to get programming tips by GUVI on a regular basis, Subscribe to GUVI Blogs by entering your email id in the “FOLLOW BLOG BY EMAIL” section.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax