what is the difference? get and set Not needed... "Bob" is displayed everywhere
1.With Get and Set: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { class Person { private string name; public string Name { get { return name; } set { name = value; } } } static void Main(string[] args) { Person p = new Person(); p.Name = "Bob"; Console.WriteLine(p.Name); } } } 2.Without Get and Set using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { class Person { private string name; public string Name; } static void Main(string[] args) { Person p = new Person(); p.Name = "Bob"; Console.WriteLine(p.Name); } } }