Hi
this code provides those values: 100 100 150 100.
I expected this: 100 100 150 150. Why is the last value not changed? I thought int variabele are of the type value and not type reference.
Thanks
static void Main(string[] args)
{
int n = 100;
int n2 = n;
Console.WriteLine(n);
Console.WriteLine(n2);
n = 150;
Console.WriteLine(n);
Console.WriteLine(n2);
}