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!

MemberInfo.DeclaringType

Retrieves the class that declares this member.

[Visual Basic]
MustOverride Public ReadOnly Property DeclaringType As Type
[C#]
public Type DeclaringType {abstract get;}
[C++]
public: __property virtual Type* get_DeclaringType() = 0;
[JScript]
public abstract function get DeclaringType() : Type;

Property Value

Read-only.

The Type object for the class that declares this member.

Remarks

The DeclaringType property retrieves a reference to the Type object for the type that declares this member. A member of a class (or interface) is either declared or inherited from a base class (or interface). The returned class may not be the same as the Type object used to obtain this MemberInfo object.

Note the example shown has a returned type of Empty and Object from a MemberInfo object from a System.Empty class.

Example

class Mymemberinfo{ public static int Main() { Console.WriteLine ("\nReflection.MemberInfo");

See Also

MemberInfo Class | MemberInfo Members | System.Reflection Namespace