An advantage of C# properties

Just found a good reason to use properties in C# rather than public variables: they’re much easier to debug. When I was getting an unexpected value in the variable, I put a break point in the property and was able to really easily find out where it was being set.

Posted on 04 Nov 04 by Helen Emerson (last updated on 04 Nov 04).
Filed under .NET