Ashraful Islam
What is Value Type and Reference Type?
By Ashraful Islam in C# on Nov 26 2016
  • Rushikesh shahapurkar
    May, 2017 11

    Reference Type variables are stored in the heap while Value Type variables are stored in the stack.Value Type: A Value Type stores its contents in memory allocated on the stack. When you created aValue Type, a single space in memory is allocated to store the value and that variable directly holds avalue.

    • 2
  • Ayappan Alagesan
    Feb, 2017 10

    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. Reference Type variables are stored in the heap while Value Type variables are stored in the stack. A Value Type stores its contents in memory allocated on the stack A Reference Type stores its contents in memory allocated on the heap

    • 2
  • Satish Sanaboyina
    Mar, 2018 15

    value type will store in stack. reference type will store in heap . string only reference type. remaining all data types are value type.

    • 1
  • MUHAMMADRAMJAN MIA
    May, 2018 1

    Value type -are stored on stack memory, get freed go out scope Reference type- are stored on heap memory, need garbage collection to free memory

    • 0
  • Bharathi Raja
    Jan, 2018 20

    down vote value data type and reference data type1) value( contain the data directly ) but reference ( refers to the data )2) in value( every variable has its own copy) but in reference (more than variable can refer to some objects)3) in value (operation variable can`t effect on other variable ) but in reference (variable can affect other )4) value types are(int, bool, float) but reference type are (array , class objects , string )

    • 0
  • Mukesh Kumar
    Aug, 2017 31

    In value type we the data size is fixed Like int,float,double In reference type data size is not fixed Like string, object

    • 0
  • Rushikesh shahapurkar
    May, 2017 11

    Reference Type variables are stored in the heap while Value Type variables are stored in the stack.Value Type: A Value Type stores its contents in memory allocated on the stack. When you created aValue Type, a single space in memory is allocated to store the value and that variable directly holds avalue.

    • 0
  • Rushikesh shahapurkar
    May, 2017 11

    Reference Type variables are stored in the heap while Value Type variables are stored in the stack.Value Type: A Value Type stores its contents in memory allocated on the stack. When you created aValue Type, a single space in memory is allocated to store the value and that variable directly holds avalue.

    • 0
  • Rushikesh shahapurkar
    May, 2017 11

    Reference Type variables are stored in the heap while Value Type variables are stored in the stack.Value Type: A Value Type stores its contents in memory allocated on the stack. When you created aValue Type, a single space in memory is allocated to store the value and that variable directly holds avalue.

    • 0
  • Rushikesh shahapurkar
    May, 2017 11

    Reference Type variables are stored in the heap while Value Type variables are stored in the stack.Value Type: A Value Type stores its contents in memory allocated on the stack. When you created aValue Type, a single space in memory is allocated to store the value and that variable directly holds avalue.

    • 0
  • Dattatray Udamale
    Apr, 2017 9

    value type stored in stack.and reference type stored in heap.

    • 0
  • Dattatray Udamale
    Apr, 2017 9

    value type stored in stack.and reference type stored in heap.

    • 0
  • Dattatray Udamale
    Apr, 2017 9

    value type stored in stack.and reference type stored in heap.

    • 0
  • Dattatray Udamale
    Apr, 2017 9

    value type stored in stack.and reference type stored in heap.

    • 0
  • Dattatray Udamale
    Apr, 2017 9

    value type stored in stack.and reference type stored in heap.

    • 0
  • Dattatray Udamale
    Apr, 2017 9

    value type stored in stack.and reference type stored in heap.

    • 0
  • Samatha Reddy
    Mar, 2017 16

    A Value types holds the data in Stack, it is fixed length type, reference type holds the data in heap,heap is now more manage, its variable length..

    • 0
  • Ashraful Islam
    Nov, 2016 26

    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. Reference Type variables are stored in the heap while Value Type variables are stored in the stack.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS