I have to add a VBScript interface to our C# app and have completed this with ScriptControlClass
(MS Scripting Engine). However, I am not too familiar with VBS and can't find a solution to this:
If I define a class then decide to make a change to that class, when I run the code for the class a second time I get the error:
Name redefined
Example:
- Define a
Class
(ex:Class test .... End Class
) - "Compile" (from C# code, call
ScriptControlClass.AddCode(code_for_class)
) - Make a change to the class's code
- "Compile" again - get error here
How do I "undefine" the class before trying to compile?
Also, I am not asking about how toDim
or Redim
an object of that class. I want to modify the class code.