Here's a particularly nasty gotcha that new .NET developers should be aware of. It should *go without saying, but nonetheless it appears that it *does need to be said. Hmph.
The sordid details are not included here to preserve the dignity of the guilty parties, but basically it boils down to: a property getter/setter is NOT the same as a public instance variable.
In other words, you are never guaranteed that the value you put in will be the value you get back. Consider the following:
If I were evil, my definition of Foo could be as below:
As I said, this is an elementary distinction (and a trivial example) but do not not not assume that just because you've asked a setter to store a value that you'll get the same value back from the getter. You should, but "should" is the most over-used word in this industry.