Wednesday, 23 January 2019

What are value types and reference types

What are value types and reference types?

Answer:


Value types are stored in the Stack.
Examples : bool, byte, chat, decimal, double, enum , float, int, long, sbyte, short, strut, uint, ulong, ushort.
Reference types are stored in the Heap.
Examples : class, delegate, interface, object, string.

No comments:

Post a Comment