Do you use Data Members or Public Properties from within the Class itself?
问题 If I have a simple class setup like this: class MyClass { private string _myName = string.Empty; public string MyName { get { return _myName; } } public void DoSomething() { // Get the name... string name = string.Empty; name = _myName; // OR name = MyName; // ...and do something with it... } } Which should I use, the public property, or the data member? Obviously, in this example it doesn't make a difference, since they both just reference the same variable. But what about real world uses of