"Adam Clauss" <ca*****@tamu.edu> wrote in message
news:11*************@corp.supernews.com...
Assembly asm = Assembly.LoadFrom(<FileName>);
Type ty = asm.GetType(<Object Name and class name>);
object obj = Activator.CreateInstance(ty);
2) If you do not have this definition, you will have to use reflection to
access the method and call it. Note - you may need to change the flags
passed to GetMethod:
MethodInfo popupMethod = ty.GetMethod("popupmsg", BindingFlags.Instance |
BindingFlags.Public);
if (popupMethod != null)
{
popupMethod.Invoke(obj, null);
}
In reading your post again - since you have to use Activator.CreateInstance
(rather than just normally constructing the object), you will almost
certainly need to use the second option (Reflection).
--
Adam Clauss