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

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -