Type.GetMembers() : Type « System « VB.Net by API






Type.GetMembers()

  

Module Module1
    Class Book
        Public Title As String
        Public Author As String
        Public Price As Double

        Public Sub New(ByVal Title As String, ByVal Author As String, ByVal Price As Double)
            Me.Title = Title
            Me.Author = Author
            Me.Price = Price
        End Sub

        Public Sub ShowTitle()
            Console.WriteLine("Title: " & Title)
        End Sub

        Public Sub ShowBook()
            Console.WriteLine("Title: " & Title)
            Console.WriteLine("Author: " & Author)
            Console.WriteLine("Price: " & Price)
        End Sub

    End Class

    Sub Main()
        Dim NetBook As New Book("AAA","BBB", 49.99)

        Console.WriteLine("Member Names")
        Dim Member As Reflection.MemberInfo

        For Each Member In NetBook.GetType.GetMembers()
            Console.WriteLine(Member.Name)
        Next

    End Sub

End Module

   
    
  








Related examples in the same category

1.Type.FindMembers
2.Type.GetHashCode()
3.Type.GetInterfaces()
4.Type.GetMethod
5.Type.GetType()
6.Type.UnderlyingSystemType