Activator.CreateInstance Method

Creates an instance of the specified type using the constructor that best matches the specified parameters.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method Static member CreateInstance<T>() Creates an instance of the type designated by the specified generic type parameter, using the parameterless constructor .
Public method Static member CreateInstance(ActivationContext) Creates an instance of the type designated by the specified ActivationContext object.
Public method Static member CreateInstance(Type) Creates an instance of the specified type using that type's default constructor.
Public method Static member CreateInstance(ActivationContext, String[]) Creates an instance of the type that is designated by the specified ActivationContext object and activated with the specified custom activation data.
Public method Static member CreateInstance(String, String) Creates an instance of the type whose name is specified, using the named assembly and default constructor.
Public method Static member CreateInstance(Type, Boolean) Creates an instance of the specified type using that type's default constructor.
Public method Static member CreateInstance(Type, Object[]) Creates an instance of the specified type using the constructor that best matches the specified parameters.
Public method Static member CreateInstance(AppDomain, String, String) Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly and default constructor.
Public method Static member CreateInstance(String, String, Object[]) Creates an instance of the type whose name is specified, using the named assembly and default constructor.
Public method Static member CreateInstance(Type, Object[], Object[]) Creates an instance of the specified type using the constructor that best matches the specified parameters.
Public method Static member CreateInstance(Type, BindingFlags, Binder, Object[], CultureInfo) Creates an instance of the specified type using the constructor that best matches the specified parameters.
Public method Static member CreateInstance(Type, BindingFlags, Binder, Object[], CultureInfo, Object[]) Creates an instance of the specified type using the constructor that best matches the specified parameters.
Public method Static member CreateInstance(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[]) Creates an instance of the type whose name is specified, using the named assembly and the constructor that best matches the specified parameters.
Public method Static member CreateInstance(AppDomain, String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[]) Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly and the constructor that best matches the specified parameters.
Public method Static member CreateInstance(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[], Evidence) Obsolete. Creates an instance of the type whose name is specified, using the named assembly and the constructor that best matches the specified parameters.
Public method Static member CreateInstance(AppDomain, String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[], Evidence) Obsolete. Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly and the constructor that best matches the specified parameters.
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft