0

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.

3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by Maligui
0

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.

Edited by Reverend Jim

0

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.

Edited by Maligui

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.