I am learning about c# and I am a little confused about (non-automatic)properties and the local variable that the property uses.
When I use properties, I put an underscore for all the private variables that is used by properties. This helps me differentiate between regular private variables and private variables used by properties. By being able to differentiate, I would quickly know if I should use the property or the underlying variable to change/set the value.
However, I recently saw that using underscore and Hungarian notation is a not so good thing. But without the notation I might accidentally call the private variable instead of the property and the logic in the property might not get called (creating bugs because the property might throw an event, or throw an exception, or check the value, or change returning variable depending on the state of the class).
What are the alternatives to this problem. Or is there a problem in my coding practice that I am not following?