c# - How to get all classes in particular dll, browse through OpenFileDialog -
I am trying to write a code specifically to get all sections in the DLL sequence. Dll must use OpenFileDialog by user. After selection, it prepares a list of all the sections in the selected DLL. I have tried the following code with no success, besides, Google did not find any concrete solutions.
Private Zero Button 1_Click (Object Sender, EventArgs E) {If (openfileDialog1.ShowDialog () == DialogResult.OK) {Type T = openFileDialog1 OpenFile () GetType (); }}
Try it out:
var assembly = Assembly. LoadFromForm (OpenFileDialog1.fileName); Various types of assembly (GETExportedTypes ()) {Console.WriteLine (type.Name); } This loads the assembly with the given name, receives all types and lists them.
Comments
Post a Comment