I\'m failing to understand what the difference is between initializing a variable, getting its value like this:
//define a local variable.
int i;
i=
It is basically concept of Object Oriented Programming.
when you use int i; ( This consider as field and this field can be internal usage as well as it can be use from outside current class depending upon access modifier. (Public , Private , Protected)
Now when you use get; set; it is property of class. It can also set from other class but diffrence it is access like method and it provide other functionality like notification of property change and all that.
Use filed when you don't want any control over it but if you want to control then use property. Also you can have get and set with public , private and protected which can also provide more flexibility interm of encaptulation.