M
Marco
Hi,
I try to use reflection to retrieve class B members and not inherited
members. I wonder why the myMember value is nothing. Any suggestions?
Thanks
Module Module1
Sub Main()
Dim myClass As B = New B
Dim myMembers As System.Reflection.MemberInfo() =
myClass.GetType.GetMembers(Reflection.BindingFlags.DeclaredOnly)
End Sub
End Module
Class A
Public a1 As Integer
Public a2 As Integer
End Class
Class B
Inherits A
Public b1 As Integer
End Class
I try to use reflection to retrieve class B members and not inherited
members. I wonder why the myMember value is nothing. Any suggestions?
Thanks
Module Module1
Sub Main()
Dim myClass As B = New B
Dim myMembers As System.Reflection.MemberInfo() =
myClass.GetType.GetMembers(Reflection.BindingFlags.DeclaredOnly)
End Sub
End Module
Class A
Public a1 As Integer
Public a2 As Integer
End Class
Class B
Inherits A
Public b1 As Integer
End Class