标题: 如何理解这段vb.net代码 [打印本页] 作者: judyni 时间: 2007-9-5 17:05 标题: 如何理解这段vb.net代码 Dim newTest As New Button
Dim strAttributeName As String '方法名字
Dim args As Object
Dim myType As Type = GetType(Button)
Dim myPropertyInfo As PropertyInfo = myType.GetProperty(strAttributeName)
Dim myMethodInfo As MethodInfo = myPropertyInfo.GetSetMethod()
myMethodInfo.Invoke(newTest, New Object() {args})