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