MemberInfo.MemberType indicates the type of the member, method, constructor, event. : MethodInfo « Reflection « VB.Net






MemberInfo.MemberType indicates the type of the member, method, constructor, event.

 

Imports System
Imports System.Reflection
Imports Microsoft.VisualBasic

Class Mymemberinfo

    Public Shared Function Main() As Integer
        Dim MyType As Type = Type.GetType("System.Reflection.PropertyInfo")
        Dim Mymemberinfoarray As MemberInfo() = MyType.GetMembers()

        Console.WriteLine(Mymemberinfoarray.GetLength(0))
        Console.WriteLine(MyType.FullName)

        Dim counter As Integer
        For counter = 0 To Mymemberinfoarray.Length - 1
            Console.WriteLine(counter.ToString() + ". " + Mymemberinfoarray(counter).Name _
               + " Member type - " + Mymemberinfoarray(counter).MemberType.ToString())
        Next counter
        Return 0
    End Function
End Class

   
  








Related examples in the same category

1.MethodInfo.GetBaseDefinition
2.MethodInfo.MemberType Property indicates that this member is a method.
3.MethodInfo.ReturnType gets the return type of this method.
4.MemberInfo Class contains information about the attributes of a member
5.Display the set of assemblies our assemblies reference
6.Display information about each assembly loading into this AppDomain.
7.Get members from a Type
8.MemberInfo.DeclaringType Property gets the class that declares this member.
9.MemberInfo.GetCustomAttributes
10.MemberInfo.Module Property gets the module
11.MemberInfo.Name gets the name of the current member.
12.MemberInfo.ReflectedType Property gets the class object that was used to obtain this instance of MemberInfo.
13.PropertyInfo Class represents the attributes of a property and provides access to property metadata.