2
Reply

Value Type and Reference Type Data type in C#?

Rahul Chavan

Rahul Chavan

Apr 05, 2016
591
0

    Value Type: A Value Type holds the data within its own memory allocation and a Reference Type contains a pointer to another memory location that holds the real data. Variables that store data are called value types. Value types are stored on stack. Predefined datatypes, structures, enumsReference Type: Reference Types are used by a reference which holds a reference (address) to the object but not the object itself. When a reference type variable is no longer used, it can be marked for garbage collection. Variables that store reference to actual data are called Reference types. Reference types stored on heap but contain the address on heap. class, interface, delegate, string, object, Array

    Rahul Chavan
    April 05, 2016
    1

    value type-int,float,double . reference type- string,object,big integer.

    Mukesh Kumar
    August 29, 2017
    0