Using
private int tada; public int TADA { get { Console.WriteLine("GETTER"); return tada; } set { Console.WriteLine("SETTER"); tada = value; } }
and
int s = TADA = 1;
I only get SETTER, which is written to the output window, so it does not call the receiver.
From C # Language Basics
You can even assign one value to several variables, for example:
int a, b, c, d;
a = b = c = d = 5;
In this case, the values โโof a, b, c and d will be 5. This works because the C # compiler performs the rightmost assignment; that is, d = 5. This assignment itself returns a value, a value of 5. the compiler then assigns this return value c. This second task also returns a value, etc., until all variables have been assigned.
source share