Link to home
Start Free TrialLog in
Avatar of Henry Ottiz
Henry Ottiz

asked on

Run code from text file in vb

I am trying to make an app that when you press a button, it reads a textfile, and executes the code inside it.

I am reading the textfile via streamreader (readtoend) , now i would like to execute the code read from the text file...

I already have my Resources which I could use if needed (below)

INITIAL APPROACH:
I was thinking of replacing the values %111% from teh resources with the info of the streamreader and then executing the code....


any ideas how to do this? tried CodeDom but was not able to make it work.

thank you.
''RESOURCES
Imports System.Net
Imports System.Text.Encoding
Imports System.Net.Sockets
Imports System
Imports System.IO.Ports
Imports System.IO
Imports System.Threading
Imports System.ComponentModel
Imports WindowsApplication1
Imports System.CodeDom
Imports System.CodeDom.Compiler
Imports Microsoft.Win32
Imports Microsoft.Win32
Imports Microsoft.CSharp
Imports Microsoft.VisualBasic
Imports System.IO.File
Imports System.Windows.Forms

Public Class testfromfile
		
		%111%

End Class

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial