NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

10.9 Special member access and invocation

Because properties appear to be data members, yet have no storage location, several special situations arise:

The last two points bear some discussion. When a non-virtual method invocation or data member access is done on a value type, the operation is done on the value itself, not a reference. This means that the actual storage location of the value type is passed to the method invoke or data member access. Since properties have no storage location, the value of the property is fetched from the getter and then copied to a temporary, which is the storage location used for the invocation or data member access. Once the invocation or data member access is done, setting the value from the temporary back to the property propagates the changes from the temporary back to the property. This means that in the example c.p.f = 10, where c is a class instance, p is a property whose type is a value type, and f is a data member of the value type, the property itself is modified and not just a temporary which is thrown away.