如问题中所述,如何使用dnlib将一个(String类型)项添加到List(Of String)?
到目前为止,这是我的进步:
Private A As AssemblyDef = AssemblyDef.Load(Filename)
Public Sub AddtoList(ByVal Listname As String, ByVal Item As String)
For Each ModuleDefintion As ModuleDef In A.Modules
For Each TypeDefinition As TypeDef In ModuleDefintion.Types
If TypeDefinition.Name = TypeName Then
For Each Field As FieldDef In TypeDefinition.Fields
If Field.Name.Equals(Listname) Then
''Add Item to List here
''What is the approach here?
End If
Next
End If
Next
Next
End Sub