When this is a simple property like this, consider replacing it with an βautomaticallyβ property, for example:
public static int NumberOfEvents {get;set;}
With the simplest properties, it doesn't matter how you access them: although access to the backup variable may seem a little faster, the optimizer will take care of optimizing the function call, making both accesses equally fast.
When a property is more complex, for example, when it has additional checks and / or trigger events, the solution becomes more complex: you need to decide whether you want to have effects associated with accessing the property, or if you want to avoid them. Then you make a decision based on what you want.
source share