2
I didn’t quite understand these classifications among the types that a variable can contain that are value types (types of value) and Reference types (reference types) that exists in the language C#, in what it says to specification:
There are two types in C#: reference types and value types. Value type variables directly contain your data as reference type variables store references to your data, the latter being known as objects. With reference types, it is possible for two variables to reference the same object and thus possible for operations in one variable to affect the object referenced by the other variable. With value types, variables have their own copy of the data, and it is not possible for operations in one to affect the other (except ref for out parameter variables and).
What do you mean? in the bold part in my opinion (if I’m wrong, correct me) is saying which variables value types are variables that have their value assigned clearly, for example:
int n1 = 1000; // value types
As variables Reference types are variables that refer to a data defined elsewhere, for example:
int n1 = 1000; // value types
int n2 = n1; // reference types
I do not know if above is relatively right, if not what are the differences between these classifications?
This answers your question? Memory allocation in C# - Value types and reference types
– RodrigoBorth