Jul 28, 2019 03:52 PM
(This post was last modified: Jul 28, 2019 04:42 PM by mutchim.)
My code get
My Code Test
Help me get the variables names and value in my code Test after compiling to .exe
I want get a33,"3333",d,222
Thank you so much
Code
Imports Mono.Cecil
Imports Mono.Cecil.Cil
Dim nasm As AssemblyDefinition
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim assembly As AssemblyDefinition = AssemblyDefinition.ReadAssembly(TextBox1.Text)
For Each t As TypeDefinition In Assembly.MainModule.Types
For Each f As FieldDefinition In t.Fields
TextBox2.Text = TextBox2.Text & f.Name & vbNewLine
Next
For Each l As PropertyDefinition In t.Properties
TextBox3.Text = TextBox3.Text & l.Name & vbNewLine
Next
For Each x As TypeDefinition In t.NestedTypes
TextBox4.Text = TextBox4.Text & x.Name & vbNewLine
Next
For Each m As MethodDefinition In t.Methods
For Each v As GenericParameter In m.GenericParameters
TextBox5.Text = TextBox5.Text & v.Name & vbNewLine
Next
For Each c As ParameterDefinition In m.Parameters
TextBox6.Text = TextBox6.Text & c.Name & vbNewLine
Next
If m.IsConstructor = False Then
TextBox7.Text = TextBox7.Text & m.Name & vbNewLine
End If
For Each c1 As VariableDefinition In m.Body.Variables
TextBox8.Text = TextBox8.Text & c1.Name & vbNewLine
Next
Next
Next
End Sub
End ClassMy Code Test
Code
Module Module1
Dim a1 As String = "eeee"
Dim a2 As Integer = 1
Sub main()
Dim a33 As String = "3333"
MsgBox(aaa(1, 2))
End Sub
Public Function aaa(ByVal b As Integer, ByVal c As Integer) As Integer
Dim d As Integer = 222
Return b + c + d
End Function
End ModuleI want get a33,"3333",d,222
Thank you so much


![[Image: Syr3DlV.png]](https://i.imgur.com/Syr3DlV.png)