VB Code:
Public Module OnlyModule
Public Sub OnlyFunction()
'do stuff
End Sub
End Module
C # code:
Assembly vbAssembly = BuildAssembly(vbCode);
Module module = vbAssembly.GetModules()[0];
MethodInfo method = module.GetMethods()[0];
method.Invoke(null, null);
As you can see, it has only one module and only one function, so why does my GetMethods () call not work? I am not completely familiar with VB, but it should be a static method, and I think that he wrote the correct path as soon as sub inside the module.
source
share