Supponiamo di voler iniettare dei nuovi algoritmi in un’applicazione Silverlight a runtime. Spediamo gli il codice sorgente che viene compilato a runtime e richiamato subito dopo. Vedere un esempio qui : Silverlight C# Compiler and Loading DLLs from a server at runtime in Silverlight
Perhaps the most interesting part of this sample is loading and assembly at runtime from within the Silverlight client application:
I’ve seen several heavy and not-so-obvious implementations on the web. It’s just a few lines of code, once you know how.
AssemblyPart part = new AssemblyPart(); MemoryStream stream = new MemoryStream(e.Result.AssemblyRawData); _compiledAssembly = part.Load(stream);