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!

Inheritance in Reflection

The following table shows which members of a base class are returned by the GetXXX methods when reflecting on a type:

Member Type Static Non Static
Constructor No No
Field No Yes. A field is always hide-by-name-and-signature.
Event Not applicable Same as property.
Method No Yes. A method (both virtual and non-virtual) can be hide-by-name or hide-by-name-and-signature.
Nested Type No No
Property Not applicable VOS states the inheritance is the same as that of the methods that implement the property. Reflection treats properties as hide-by-name-and-signature. See Note 2.

Notes

  1. Hide-by-name-and-signature considers all of the parts of the signature: custom modifiers, return type, parameter types, sentinel, unmanaged calling convention. It is a binary comparison.
  2. For Reflection, properties and events are hide-by-name-and-signature. So, if you have a property Foo with a Getter and a Setter in the base class but the subclass has only a Getter method, the subclass property hides the base class property; that is, you will not be able to access the Setter on the base class.
  3. Custom attributes are not part of VOS. See the CustomAttributes specification for a description of the inheritance rules for custom attributes.