Need help/example of using system.reflection, code below.
Error: Could not load file or assembly 'file:///C:\Windows\System32\notepad.exe' or one of it's dependencies. The module was expected to contain an assembly manifest.
Trying: When b1 Is Clicked, I Would Like It To Load The File From The t1, And Display The Information In r1. (b1=button1/t1=textbox1/r1=richtextbox1)
Help appreciated, Thanks
Code:
Imports System.Reflection
Public Class Form1
Private Sub b1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b1.Click
Try
Dim nasm As Assembly = Assembly.LoadFrom(t1.Text) ' C:\Windows\System32\notepad.exe
Dim w As New List(Of String)
Try
w.Add(nasm.CodeBase.ToString)
w.Add(vbCrLf)
Catch
End Try
r1.Lines = w.ToArray
Catch
MsgBox(ErrorToString)
End Try
End Sub
End Class
Trying: When b1 Is Clicked, I Would Like It To Load The File From The t1, And Display The Information In r1. (b1=button1/t1=textbox1/r1=richtextbox1)
Help appreciated, Thanks