[Mono-dev] Deferred loading of assemblies in C#?

Zoltan Varga vargaz at gmail.com
Sun Aug 23 15:54:16 EDT 2009


Hi,

  Its not possible, the compiler needs the referenced assembly in order to
decide whenever
your program is correct or not. You can use reflection to load assemblies at
runtime.

                      Zoltan

On Thu, Jul 23, 2009 at 6:03 AM, SebastianGarth <sebastiangarth at gmail.com>wrote:

>
> Hello, I have a general question with respect to loading assemblies at
> runtime. Specifically, I would like to know if it is possible to reference
> a
> class at compile time and have it resolve at link time? For instance, let's
> say I have the following program:
>
> using Foo;
>
> class Test
> {
>        static void Main( string [ ] Unused )
>        {
>                Foo.Bar foobar = new Foo.Bar( );
>                foobar.baz( );
>        }
> };
>
> Now the external assembly 'Foo' isn't accessible at compile time, but I
> would like to have my program compile into an 'incomplete' assembly, and
> then later resolve the reference in another step, if that makes sense?
>
>
> --
> View this message in context:
> http://www.nabble.com/Deferred-loading-of-assemblies-in-C---tp24618972p24618972.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090823/23eab5f5/attachment.html 


More information about the Mono-devel-list mailing list