properties

properties

Properties vs. Public Variables

I occasionally see code with properties like this: private int name; public int Name {     get { return name; }     set { name = value; } } As I see it, there are three things to consider here. 1. When is a property not a property? When it's a glorified public variable. Why waste everyone&

By Jeff Atwood ·
Comments