It comes down to semantics. Yes, C # has “properties” that give you the get / set 'method' stub method ... but functions (... "methods" ...) in the .NET Framework that start with "Get" should be developed by the developer in that some operations occur for the sole purpose of obtaining certain results.
You might think this is strange and say, “Why not just use the return type to identify people in?” And the answer is simple. Think of the following methods:
public Person CreatePerson(string firstName, string lastName) {...}
Just by the name of this method, you can probably see that the database activity will be activated, and then the newly created “person” will be returned.
but how about this:
public Person GetPerson(string firstName, string lastName) {...}
Just by this method name you can assume that 100% “safe” extraction of a person from the database is performed.
You will never call CreatePerson a few times ... but you must feel safe to constantly call GetPerson. (it should not affect the "state" of the application).
source share