Name

MemberInfo

Synopsis

This class is the base type for all reflective types defined in the .NET environment; it defines the basic data associated with any member (field, method, property, event, nested type) of a given type. Note that even System.Type itself inherits from this class.

By itself, MemberInfo is a fairly simple type. It consists of four properties: DeclaringType (a reference to the System.Type in which this member was declared, which might be a base type to the class being reflected over), MemberType (an enumeration describing the type of the member), Name, and ReflectedType (the System.Type instance from which this MemberInfo object was received in the first place). MemberInfo also consists of two methods, GetCustomAttributes() and IsDefined(), both of which deal with any custom attributes defined on this member.

Public MustInherit Class MemberInfo : Implements ICustomAttributeProvider
' Protected Constructors
   Protected Sub New() 
' Public Instance Properties
   MustInherit Public ReadOnly Property DeclaringType As Type  
   MustInherit Public ReadOnly Property MemberType As MemberTypes  
   MustInherit Public ReadOnly Property Name As String  
   MustInherit Public ReadOnly Property ReflectedType As Type  
' Public Instance Methods
   MustInherit Public Function GetCustomAttributes(
        ByVal inherit As Boolean) As Object() Implements 
        ICustomAttributeProvider.GetCustomAttributes 
   MustInherit Public Function GetCustomAttributes( ByVal attributeType As Type, ByVal inherit As Boolean) As Object() ...

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.