Is there any benefit to declaring a private property with a getter and setter?
- by AmoebaMan17
I am reviewing another developer's code and he has written a lot of code for class level variables that is similar to the following:
/// <summary>
/// how often to check for messages
/// </summary>
private int CheckForMessagesMilliSeconds { get; set; }
/// <summary>
/// application path
/// </summary>
private string AppPath { get; set; }
Doesn't coding this way add unnecessary overhead since the variable is private?
Am I not considering a situation where this pattern of coding is required for private variables?