The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Do use a method, rather than a property, in the following situations.
The operation is orders of magnitude slower than a field set would be. If you are even considering providing an asynchronous version of an operation to avoid blocking the thread, it is very likely that the operation is too expensive to be a property. In particular, operations that access the network or the file system (other than once for initialization) should most likely be methods, not properties.
There are many times when a property change triggers an async call.
Actually, I tend to disagree. It's still a side-effect. A property setter should do only that -- set the underlying field value, which changes the state of the object for just that property. Doing anything else obscures the fact that the setter does something that potentially affects the rest of the application, or has additional hidden state changes of the object itself. If you really need an async operation, personally, I would code a method like await UpdateCustomer(selectedCustomer);, which is a lot clearer.
You know, I searched the lounge, not the insider. I shall now go to the woodshed for my beating .
Confirmed for this guy? No idea. I do know that all of the unix guys I worked with mapped the rm command to a shell script. Normally, the prompt would be something like "Are you really sure you want to do this?"
I've seen guys wipe the wrong folders. That damn command is fast, no time taken to calculate how long things will take.
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759