【发布时间】:2012-12-08 01:57:39
【问题描述】:
如何从reflection.assembly中获取property.value?
Dim assembly As Assembly = assembly.GetExecutingAssembly()
For Each assemblyType As Type In assembly.GetTypes()
If assemblyType.IsSubclassOf(GetType(Form)) Then
'Dim name As AssemblyName() = assembly.GetReferencedAssemblies()
If assemblyType.BaseType.ToString.EndsWith("Form2") Then
Dim props As PropertyInfo = _
GetType(Form2).GetProperty("FriendlyName")
If Not props Is Nothing Then
ComboBox1.Items.Add(assemblyType.Namespace )
End If
'//Here I want to get Prop.value that is string type
End If
【问题讨论】:
标签: vb.net reflection