2

如问题所述,如何使用dnlib将项目(字符串类型)添加到列表(字符串) ?

到目前为止,这是我的进步:

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
4

0 回答 0