This is a discussion on What is Value type and reference type in .Net? within the VB.NET Programming forums, part of the Software Development category; What is Value type and reference type in .Net?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| (From MSDN) Value types include: All numeric data types Boolean, Char, and Date All structures, even if their members are reference types Enumerations, since their underlying type is always Byte, Short, Integer, or Long Reference types include: String All arrays, even if their elements are value types Class types, such as Form Delegates Got It... Oxygen |
| |||
| Value types directly contain their data which are either allocated on the stack or allocated in-line in a structure. Reference types store a reference to the value's memory address, and are allocated on the heap. Reference types can be self-describing types, pointer types, or interface types. Variables that are value types each have their own copy of the data, and therefore operations on one variable do not affect other variables. Variables that are reference types can refer to the same object; therefore, operations on one variable can affect the same object referred to by another variable. All types derive from the System.Object base type.
__________________ S.VinothkumaR Behind me is infinite power, Before me is Endless Possibility, Around me is Boundless Opportunity, Why should I fear! |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to get element by its type | seesamjagan | HTML, CSS and Javascript Coding Techniques | 3 | 01-02-2008 04:51 AM |
| Can I set the MIME type with a <meta/> tag | itbarota | HTML, CSS and Javascript Coding Techniques | 1 | 09-11-2007 12:39 AM |
| How to do a type conversion in VC++ .NET? | bluesky | C and C++ Programming | 2 | 08-10-2007 05:38 AM |
| void return type | anbuchezhians | Java Programming | 1 | 07-25-2007 05:55 AM |
| C # Support C type macros~! | vigneshgets | C# Programming | 0 | 05-17-2007 07:19 AM |