I think the question was about public properties vs. public variables in objects -- as in
public class Example {
public Vector3 Position;
// versus
private Vector3 myPosition;
public Vector3 PositionAccessor { get { return myPosition; } set { myPosition = value; } }
}
I know nothing about how C# works, so my instinct is to say that public accessors act like a getPosition() accessor method, while public variables are smart enough to stay off the stack. Can anyone clear this up?
My general approach is to use public variables unless I absolutely need accessors (to only allow a get, or to manipulate other fields when one is set).