Should properties in C# perform a lot of work?

Posted by Hamish Grubijan on Stack Overflow See other posts from Stack Overflow or by Hamish Grubijan
Published on 2010-05-06T22:26:57Z Indexed on 2010/05/06 22:28 UTC
Read the original article Hit count: 137

Filed under:
|
|

When a property is read from or is assigned to, one would not expect it to perform a lot of work. When setSomeValue(...) and getSomeValue(...) methods are used instead, one should not be that surprised that something non-trivial might be going on under the hood. However, now that C# gave the world Properties, it seems silly to use getter and setter methods instead. What is your take on this? Should I mark this Q as a community wiki?

Thanks.

© Stack Overflow or respective owner

Related posts about c#

Related posts about properties