C# Get; Set; question?

Hi guys. Still getting my hands dirty with C#. Right now I am studying this statement: public class Department { public long Id { get; set; } public string Name { get; set; } public override string ToString() { return Name; } } Can someone give me a plain english explanation on what the get; set; stuff is... show more Hi guys.

Still getting my hands dirty with C#.

Right now I am studying this statement:


public class Department
{
public long Id { get; set; }
public string Name { get; set; }
public override string ToString()
{
return Name;
}
}


Can someone give me a plain english explanation on what the get; set; stuff is and what it does exactly? My textbook does not explain this in a clear way. Thank you.
2 answers 2