If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: To Create an object at runtime

This makes ErrorMsg a local variable for that method. You can't refer to it
outside the method, and as soon as the method finishes its local variables
are candidates for garbage collection.

Don't know what you mean by "it doesn't work". Local variables work.
You'll get a compiler error if you try to reference them outside of their
scope. Hope this helps, your question isn't very clear or specific.