Is it possible to make a text file or separate class file that could be imported as lines of code. e.g. I have this simple line of code:

Dim x = 0
messagebox.show(x)
Import(text file or other file)
'run the code from the other file
'resume code in this file
X = X + 1

Is it possible to do this instead of getting a new .exe file with the code changes.

I am trying to have a .exe file that a bunch of my users have and then have an external code file that the .exe grabs and uses as code.

As far as I know this is not possible in VB 2010 or earlier but I seem to recall reading that this might be a feature in VB 2012. It is, however, available in vbScript.

Thank you, again.

I remember there are some classes in Reflection.Emit namespace that can create dynamic objects that are used at runtime. You do not have to recompile for the classes to be used. However, it requires a lot of knowledge in VB.NET, and is not for the faint of heart.

Here is a code project article (sorry it is in C#) that explains how to do what you are talking about.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.