Some methods will perform an operation on an object’s property (can’t think of an example), but some methods will not actually affect an object’s property but just return a value (DateTime.Add() for example).
I know it’s a simple question but I don’t know how to refer to the two types of methods.
Property Access Methods and Derived Property Methods are what I’ve used in the past to differentiate.
For example a property access method may well do the following for an imaginary property that isn’t stored as a DateTime.
a derived property method would be:
I’m deliberately avoiding the discussion about what should be properties and what should be methods on the understanding that this is well defined in the context posted by the OP.
Modifying properties within these methods, as Adam says is a good way to introduce side effects – best to stick with good names (e.g. ModifyTotal) and conventions that Get methods and property gets should never (normally) modify properties.