It depends?
I always use getters and setters since they created this shortcut:
public int Foo {get; set; }
At compile time, it is translated. Now you cannot understand what it is, but it is, and if you need to get a fantasy, you just say it later.
However, public, private, secure ... it all depends on who you want to configure the data for. We use inheritance a lot, and this is a very common method for us, so only chidren can edit certain properties.
protected _foo; public Foo { get { return _foo; } }
Russell Steen Aug 14 '09 at 12:35 2009-08-14 12:35
source share