>>I want to store some code in an XML file and execute that code dynamically at runtime. Is there any good way to accomplish this in vb.net?
LOL. how to get JIT to handle the IL at will- assuming you are saving IL rather than text. We've also experimented with xaml and bindings etc without much luck. Maybe if you store/generate assemblies to be saved to disk as needed?
If you do use reflection you won't be able to obfuscate your app, meaning you're distributing your native source code every time.
I'm sure you know that VFP can do this this because its p-compiler accompanies the runtimes, allowing VFP's _execute to run IL or text commands on any variable, cursor or whatever without needing to predetermine heaps of parameters. This matters because if you use VFP Compiler to convert a VFP app to a C++ dll for the purpose of protection, theoretically you could generate a managed dll that makes use of the unmanaged VFP runtime dll, allowing you to keep doing all this sort of stuff in a "NET" app. Suffice to say that we've become quite familiar with _execute. Once again It's really impressive that people thought up all this stuff well over 20 years ago while other parts of the industry are still lurching towards realization.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us."
-- Shakespeare: Coriolanus, Act 1, scene 1