Categories of variables of C sharp programs

State the two most important categories which distinctly categorize variables of C# programs.

E

Expert

Verified

Variables which are defined in C# program belong to two main categories: the value type and the reference type. Variables which are based on the value type contain the value which is either allocated on the stack or allocated in-line in the structure. Variables that belong to reference types store a memory address of the variable, which in turn stores value and are assigned on heap. Variables which are based on the value types contain their own copy of data and hence operations done on single variable do not engage other variables. Reference-type variables return changes made in the referring variables.

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.