=?Utf-8?B?TWFuZGFy?= <an*******@disc ussions.microso ft.com> wrote:
How do i instantiate a class if I get the name of the class at runtime ?
I am looking for something like class.forname(" classABC") in Java .
Well, Type.GetType is roughly the equivalent of Class.forName, but
Activator.Creat eInstance is roughly the equivalent of
Class.newInstan ce.
Note that in order to get a Type object for a type in an assembly other
than either the calling one or mscorlb, you need to either load the
assembly yourself and use Assembly.GetTyp e, or include the full name of
the type including assembly information in the call to Type.GetType.
--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too