I read a lot about this - it seems to me that I am very close to the answer. I'm just looking for a method call from the DLL file that I created.
For instance:
My dll file:
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ExampleDLL { class Program { static void Main(string[] args) { System.Windows.Forms.MessageBox.Show(args[0]); } public void myVoid(string foo) { System.Windows.Forms.MessageBox.Show(foo); } } }
My expression:
string filename = @"C:\Test.dll"; Assembly SampleAssembly; SampleAssembly = Assembly.LoadFrom(filename);
All credits go to SO user 'woohoo' for the above snippet. How to call a managed DLL file in C #?
Now, however, I would like to be able to not only refer to my Dll (and the methods inside it), but correctly call the methods inside it (in this case, I would like to call the myVoid method).
Anyone have any suggestions for me?
Thanks,
Evan
user725913
source share