Something like this:
Make sure you have a Imports System.Reflection at the top.
VB Code:
Dim PropInfo As PropertyInfo() Dim pi As PropertyInfo Dim tmpObject() As Object PropInfo = Me.GetType.GetProperties() For Each pi In PropInfo If pi.DeclaringType.Name = "ObjectExample" Then MsgBox((pi.Name & " : " & pi.GetValue(Me, tmpObject))) End If Next




Reply With Quote