从反射与后期绑定中,什么应该更合适或建议在 VB.NET 中使用:
'Type can be various objects that have a common property for sure.'
Dim type = sender.GetType()
Dim prop = type.GetProperty("Text", 20)
Dim value = property.GetValue(sender, Nothing)
相对:
Dim value = sender.Text