Feedback

Wert einer Property auslesen

Sprache: VB

Wert einer property eines beliebigene Objects auslesen
Public Shared Function GetPropertyValue(ByVal obj As Object, ByVal sProperty As String) As Object
            Return obj.GetType().InvokeMember(sProperty, BindingFlags.GetProperty, Nothing, obj, Nothing)
End Function
Public Shared Function GetPropertyValue(ByVal obj As Object, ByVal sProperty As String) As Object
            Return obj.GetType().InvokeMember(sProperty, BindingFlags.GetProperty, Nothing, obj, Nothing)
End Function