It's probably very lame question, but I found no references in C# specification about round brackets. Please point me to spec or msdn if answer on that question will be obvious.
What is the inner difference between (MyType)SomeObj.Property1 and (MyType)(SomeObj.Property1) in C# ?
AFAIK, in first case ( (x)SomeObj.Property1 cast ) - it will be the reference of concrete type (MyType) to Property1. In second case, such reference will execute get accessor SomeObj.get_Property1. And it eventually could lead to subtle errors if get accessor have any side effects (and its often - do have ones)
Could anyone point me to exact documentation where such behaviour specified ?
Updated: Thank you for pointing. And I deeply apologize about such dumb question - after posting this question, I found a typo in example I fiddle with and thus realized that second case behaviour was not based on code I tried to compile, but on previously compiled completely different code. So my question was initially based on my own blindness ...