You can use Assembly.Load(...) and Reflection just like with the full .NET CLR. However when using Assembly.Load(...) in Silverlight you must qualify the assembly name with a version number. For example:
Assembly.Load("ClassLibrary1, Version=1.0.0.0")
or
Type.GetType("ClassLibrary1.Class1, ClassLibrary1, Version=1.0.0.0")
Also you can only call public methods with Reflection in Silverlight.
jcansdale
Member
14 Points
3 Posts
Re: Late loading/binding?
May 21, 2007 02:53 PM | LINK
Hi Kevin,
You can use Assembly.Load(...) and Reflection just like with the full .NET CLR. However when using Assembly.Load(...) in Silverlight you must qualify the assembly name with a version number. For example:
Assembly.Load("ClassLibrary1, Version=1.0.0.0")
or
Type.GetType("ClassLibrary1.Class1, ClassLibrary1, Version=1.0.0.0")
Also you can only call public methods with Reflection in Silverlight.
You may find the following useful when experimenting with what you can and can't do in Silvelight:
http://weblogs.asp.net/nunitaddin/archive/2007/05/16/test-with-silverlight-coreclr.aspx
Cheers,
Jamie.
--
http://www.testdriven.net
http://weblogs.asp.net/nunitaddn
agclr CLR