如何使用dnlib将项添加到现有List(Of String)?

时间:2016-03-02 07:11:33

标签: .net vb.net dnlib

如问题中所述,如何使用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

0 个答案:

没有答案