mscorlib(4.0.0.0) API with additions
|
Contains methods to create types of objects locally or remotely, or obtain references to existing remote objects. This class cannot be inherited. More...
Static Public Member Functions | |
static object | CreateInstance (Type type, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture) |
Creates an instance of the specified type using the constructor that best matches the specified parameters. More... | |
static object | CreateInstance (Type type, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes) |
Creates an instance of the specified type using the constructor that best matches the specified parameters. More... | |
static object | CreateInstance (Type type, params object[] args) |
Creates an instance of the specified type using the constructor that best matches the specified parameters. More... | |
static object | CreateInstance (Type type, object[] args, object[] activationAttributes) |
Creates an instance of the specified type using the constructor that best matches the specified parameters. More... | |
static object | CreateInstance (Type type) |
Creates an instance of the specified type using that type's default constructor. More... | |
static ObjectHandle | CreateInstance (string assemblyName, string typeName) |
Creates an instance of the type whose name is specified, using the named assembly and default constructor. More... | |
static ObjectHandle | CreateInstance (string assemblyName, string typeName, object[] activationAttributes) |
Creates an instance of the type whose name is specified, using the named assembly and default constructor. More... | |
static object | CreateInstance (Type type, bool nonPublic) |
Creates an instance of the specified type using that type's default constructor. More... | |
static T | CreateInstance< T > () |
Creates an instance of the type designated by the specified generic type parameter, using the parameterless constructor. More... | |
static ObjectHandle | CreateInstanceFrom (string assemblyFile, string typeName) |
Creates an instance of the type whose name is specified, using the named assembly file and default constructor. More... | |
static ObjectHandle | CreateInstanceFrom (string assemblyFile, string typeName, object[] activationAttributes) |
Creates an instance of the type whose name is specified, using the named assembly file and default constructor. More... | |
static ObjectHandle | CreateInstance (string assemblyName, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes, Evidence securityInfo) |
Creates an instance of the type whose name is specified, using the named assembly and the constructor that best matches the specified parameters. More... | |
static ObjectHandle | CreateInstance (string assemblyName, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes) |
Creates an instance of the type whose name is specified, using the named assembly and the constructor that best matches the specified parameters. More... | |
static ObjectHandle | CreateInstanceFrom (string assemblyFile, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes, Evidence securityInfo) |
Creates an instance of the type whose name is specified, using the named assembly file and the constructor that best matches the specified parameters. More... | |
static ObjectHandle | CreateInstanceFrom (string assemblyFile, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes) |
Creates an instance of the type whose name is specified, using the named assembly file and the constructor that best matches the specified parameters. More... | |
static ObjectHandle | CreateInstance (AppDomain domain, string assemblyName, string typeName) |
Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly and default constructor. More... | |
static ObjectHandle | CreateInstance (AppDomain domain, string assemblyName, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes, Evidence securityAttributes) |
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. More... | |
static ObjectHandle | CreateInstance (AppDomain domain, string assemblyName, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes) |
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. More... | |
static ObjectHandle | CreateInstanceFrom (AppDomain domain, string assemblyFile, string typeName) |
Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly file and default constructor. More... | |
static ObjectHandle | CreateInstanceFrom (AppDomain domain, string assemblyFile, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes, Evidence securityAttributes) |
Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly file and the constructor that best matches the specified parameters. More... | |
static ObjectHandle | CreateInstanceFrom (AppDomain domain, string assemblyFile, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes) |
Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly file and the constructor that best matches the specified parameters. More... | |
static ObjectHandle | CreateInstance (ActivationContext activationContext) |
Creates an instance of the type designated by the specified T:System.ActivationContext object. More... | |
static ObjectHandle | CreateInstance (ActivationContext activationContext, string[] activationCustomData) |
Creates an instance of the type that is designated by the specified T:System.ActivationContext object and activated with the specified custom activation data. More... | |
static ObjectHandle | CreateComInstanceFrom (string assemblyName, string typeName) |
Creates an instance of the COM object whose name is specified, using the named assembly file and the default constructor. More... | |
static ObjectHandle | CreateComInstanceFrom (string assemblyName, string typeName, byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm) |
Creates an instance of the COM object whose name is specified, using the named assembly file and the default constructor. More... | |
static object | GetObject (Type type, string url) |
Creates a proxy for the well-known object indicated by the specified type and URL. More... | |
static object | GetObject (Type type, string url, object state) |
Creates a proxy for the well-known object indicated by the specified type, URL, and channel data. More... | |
Additional Inherited Members |
Contains methods to create types of objects locally or remotely, or obtain references to existing remote objects. This class cannot be inherited.
Definition at line 21 of file Activator.cs.
|
static |
Creates an instance of the COM object whose name is specified, using the named assembly file and the default constructor.
assemblyName | The name of a file that contains an assembly where the type named typeName is sought. |
typeName | The name of the preferred type. |
T:System.ArgumentNullException | typeName or assemblyName is null . |
T:System.TypeLoadException | An instance cannot be created through COM. -or- typename was not found in assemblyName . |
T:System.MissingMethodException | No matching constructor was found. |
T:System.IO.FileNotFoundException | assemblyName is not found, or the module you are trying to load does not specify a file name extension. |
T:System.MemberAccessException | Cannot create an instance of an abstract class.-or-This member was invoked with a late-binding mechanism. |
T:System.NotSupportedException | The caller cannot provide activation attributes for an object that does not inherit from T:System.MarshalByRefObject. |
T:System.ArgumentException | assemblyName is the empty string (""). |
Definition at line 832 of file Activator.cs.
|
static |
Creates an instance of the COM object whose name is specified, using the named assembly file and the default constructor.
assemblyName | The name of a file that contains an assembly where the type named typeName is sought. |
typeName | The name of the preferred type. |
hashValue | The value of the computed hash code. |
hashAlgorithm | The hash algorithm used for hashing files and generating the strong name. |
T:System.ArgumentNullException | typeName or assemblyName is null . |
T:System.ArgumentException | assemblyName is the empty string (""). |
T:System.IO.PathTooLongException | An assembly or module was loaded twice with two different evidences, or the assembly name is longer than MAX_PATH characters. |
T:System.IO.FileNotFoundException | assemblyName is not found, or the module you are trying to load does not specify a file name extension. |
T:System.IO.FileLoadException | assemblyName is found but cannot be loaded. |
T:System.BadImageFormatException | assemblyName is not a valid assembly. |
T:System.Security.SecurityException | A code base that does not start with "file://" was specified without the required WebPermission . |
T:System.TypeLoadException | An instance cannot be created through COM.-or- typename was not found in assemblyName . |
T:System.MissingMethodException | No matching constructor was found. |
T:System.MemberAccessException | An instance of an abstract class cannot be created. -or-This member was invoked with a late-binding mechanism. |
T:System.NotSupportedException | The caller cannot provide activation attributes for an object that does not inherit from T:System.MarshalByRefObject. |
Definition at line 860 of file Activator.cs.
|
static |
Creates an instance of the specified type using the constructor that best matches the specified parameters.
type | The type of object to create. |
bindingAttr | A combination of zero or more bit flags that affect the search for the type constructor. If bindingAttr is zero, a case-sensitive search for public constructors is conducted. |
binder | An object that uses bindingAttr and args to seek and identify the type constructor. If binder is null , the default binder is used. |
args | An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If args is an empty array or null , the constructor that takes no parameters (the default constructor) is invoked. |
culture | Culture-specific information that governs the coercion of args to the formal types declared for the type constructor. If culture is null , the T:System.Globalization.CultureInfo for the current thread is used. |
T:System.ArgumentNullException | type is null . |
T:System.ArgumentException | type is not a RuntimeType . -or- type is an open generic type (that is, the P:System.Type.ContainsGenericParameters property returns true ). |
T:System.NotSupportedException | type cannot be a T:System.Reflection.Emit.TypeBuilder.-or- Creation of T:System.TypedReference, T:System.ArgIterator, T:System.Void, and T:System.RuntimeArgumentHandle types, or arrays of those types, is not supported. -or- The assembly that contains type is a dynamic assembly that was created with F:System.Reflection.Emit.AssemblyBuilderAccess.Save.-or-The constructor that best matches args has varargs arguments. |
T:System.Reflection.TargetInvocationException | The constructor being called throws an exception. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Runtime.InteropServices.InvalidComObjectException | The COM type was not obtained through Overload:System.Type.GetTypeFromProgID or Overload:System.Type.GetTypeFromCLSID. |
T:System.MissingMethodException | No matching constructor was found. |
T:System.Runtime.InteropServices.COMException | type is a COM object but the class identifier used to obtain the type is invalid, or the identified class is not registered. |
T:System.TypeLoadException | type is not a valid type. |
Definition at line 57 of file Activator.cs.
|
static |
Creates an instance of the specified type using the constructor that best matches the specified parameters.
type | The type of object to create. |
bindingAttr | A combination of zero or more bit flags that affect the search for the type constructor. If bindingAttr is zero, a case-sensitive search for public constructors is conducted. |
binder | An object that uses bindingAttr and args to seek and identify the type constructor. If binder is null , the default binder is used. |
args | An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If args is an empty array or null , the constructor that takes no parameters (the default constructor) is invoked. |
culture | Culture-specific information that governs the coercion of args to the formal types declared for the type constructor. If culture is null , the T:System.Globalization.CultureInfo for the current thread is used. |
activationAttributes | An array of one or more attributes that can participate in activation. This is typically an array that contains a single T:System.Runtime.Remoting.Activation.UrlAttribute object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation. |
T:System.ArgumentNullException | type is null . |
T:System.ArgumentException | type is not a RuntimeType . -or- type is an open generic type (that is, the P:System.Type.ContainsGenericParameters property returns true ). |
T:System.NotSupportedException | type cannot be a T:System.Reflection.Emit.TypeBuilder.-or- Creation of T:System.TypedReference, T:System.ArgIterator, T:System.Void, and T:System.RuntimeArgumentHandle types, or arrays of those types, is not supported.-or- activationAttributes is not an empty array, and the type being created does not derive from T:System.MarshalByRefObject. -or- The assembly that contains type is a dynamic assembly that was created with F:System.Reflection.Emit.AssemblyBuilderAccess.Save.-or-The constructor that best matches args has varargs arguments. |
T:System.Reflection.TargetInvocationException | The constructor being called throws an exception. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Runtime.InteropServices.InvalidComObjectException | The COM type was not obtained through Overload:System.Type.GetTypeFromProgID or Overload:System.Type.GetTypeFromCLSID. |
T:System.MissingMethodException | No matching constructor was found. |
T:System.Runtime.InteropServices.COMException | type is a COM object but the class identifier used to obtain the type is invalid, or the identified class is not registered. |
T:System.TypeLoadException | type is not a valid type. |
Definition at line 90 of file Activator.cs.
|
static |
Creates an instance of the specified type using the constructor that best matches the specified parameters.
type | The type of object to create. |
args | An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If args is an empty array or null , the constructor that takes no parameters (the default constructor) is invoked. |
T:System.ArgumentNullException | type is null . |
T:System.ArgumentException | type is not a RuntimeType . -or- type is an open generic type (that is, the P:System.Type.ContainsGenericParameters property returns true ). |
T:System.NotSupportedException | type cannot be a T:System.Reflection.Emit.TypeBuilder.-or- Creation of T:System.TypedReference, T:System.ArgIterator, T:System.Void, and T:System.RuntimeArgumentHandle types, or arrays of those types, is not supported. -or- The assembly that contains type is a dynamic assembly that was created with F:System.Reflection.Emit.AssemblyBuilderAccess.Save.-or-The constructor that best matches args has varargs arguments. |
T:System.Reflection.TargetInvocationException | The constructor being called throws an exception. |
T:System.MethodAccessException | In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.MemberAccessException, instead.The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Runtime.InteropServices.InvalidComObjectException | The COM type was not obtained through Overload:System.Type.GetTypeFromProgID or Overload:System.Type.GetTypeFromCLSID. |
T:System.MissingMethodException | In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.MissingMemberException, instead.No matching public constructor was found. |
T:System.Runtime.InteropServices.COMException | type is a COM object but the class identifier used to obtain the type is invalid, or the identified class is not registered. |
T:System.TypeLoadException | type is not a valid type. |
Definition at line 148 of file Activator.cs.
|
static |
Creates an instance of the specified type using the constructor that best matches the specified parameters.
type | The type of object to create. |
args | An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If args is an empty array or null , the constructor that takes no parameters (the default constructor) is invoked. |
activationAttributes | An array of one or more attributes that can participate in activation. This is typically an array that contains a single T:System.Runtime.Remoting.Activation.UrlAttribute object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation. |
T:System.ArgumentNullException | type is null . |
T:System.ArgumentException | type is not a RuntimeType . -or- type is an open generic type (that is, the P:System.Type.ContainsGenericParameters property returns true ). |
T:System.NotSupportedException | type cannot be a T:System.Reflection.Emit.TypeBuilder.-or- Creation of T:System.TypedReference, T:System.ArgIterator, T:System.Void, and T:System.RuntimeArgumentHandle types, or arrays of those types, is not supported.-or- activationAttributes is not an empty array, and the type being created does not derive from T:System.MarshalByRefObject. -or- The assembly that contains type is a dynamic assembly that was created with F:System.Reflection.Emit.AssemblyBuilderAccess.Save.-or-The constructor that best matches args has varargs arguments. |
T:System.Reflection.TargetInvocationException | The constructor being called throws an exception. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Runtime.InteropServices.InvalidComObjectException | The COM type was not obtained through Overload:System.Type.GetTypeFromProgID or Overload:System.Type.GetTypeFromCLSID. |
T:System.MissingMethodException | No matching public constructor was found. |
T:System.Runtime.InteropServices.COMException | type is a COM object but the class identifier used to obtain the type is invalid, or the identified class is not registered. |
T:System.TypeLoadException | type is not a valid type. |
Definition at line 176 of file Activator.cs.
|
static |
Creates an instance of the specified type using that type's default constructor.
type | The type of object to create. |
T:System.ArgumentNullException | type is null . |
T:System.ArgumentException | type is not a RuntimeType . -or- type is an open generic type (that is, the P:System.Type.ContainsGenericParameters property returns true ). |
T:System.NotSupportedException | type cannot be a T:System.Reflection.Emit.TypeBuilder.-or- Creation of T:System.TypedReference, T:System.ArgIterator, T:System.Void, and T:System.RuntimeArgumentHandle types, or arrays of those types, is not supported.-or- The assembly that contains type is a dynamic assembly that was created with F:System.Reflection.Emit.AssemblyBuilderAccess.Save. |
T:System.Reflection.TargetInvocationException | The constructor being called throws an exception. |
T:System.MethodAccessException | In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.MemberAccessException, instead.The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Runtime.InteropServices.InvalidComObjectException | The COM type was not obtained through Overload:System.Type.GetTypeFromProgID or Overload:System.Type.GetTypeFromCLSID. |
T:System.MissingMethodException | In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.MissingMemberException, instead.No matching public constructor was found. |
T:System.Runtime.InteropServices.COMException | type is a COM object but the class identifier used to obtain the type is invalid, or the identified class is not registered. |
T:System.TypeLoadException | type is not a valid type. |
Definition at line 204 of file Activator.cs.
|
static |
Creates an instance of the type whose name is specified, using the named assembly and default constructor.
assemblyName | The name of the assembly where the type named typeName is sought. For more information, see the Remarks section. If assemblyName is null , the executing assembly is searched. |
typeName | The fully qualified name of the preferred type. |
T:System.ArgumentNullException | typeName is null . |
T:System.MissingMethodException | No matching public constructor was found. |
T:System.TypeLoadException | typename was not found in assemblyName . |
T:System.IO.FileNotFoundException | assemblyName was not found. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | You cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Reflection.TargetInvocationException | The constructor, which was invoked through reflection, threw an exception. |
T:System.Runtime.InteropServices.InvalidComObjectException | The COM type was not obtained through Overload:System.Type.GetTypeFromProgID or Overload:System.Type.GetTypeFromCLSID. |
T:System.NotSupportedException | Creation of T:System.TypedReference, T:System.ArgIterator, T:System.Void, and T:System.RuntimeArgumentHandle types, or arrays of those types, is not supported. |
T:System.BadImageFormatException | assemblyName is not a valid assembly. -or-The common language runtime (CLR) version 2.0 or later is currently loaded, and assemblyName was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0. |
T:System.IO.FileLoadException | An assembly or module was loaded twice with two different evidences. -or-The assembly name or code base is invalid. |
Definition at line 230 of file Activator.cs.
|
static |
Creates an instance of the type whose name is specified, using the named assembly and default constructor.
assemblyName | The name of the assembly where the type named typeName is sought. If assemblyName is null , the executing assembly is searched. |
typeName | The fully qualified name of the preferred type. |
activationAttributes | An array of one or more attributes that can participate in activation. This is typically an array that contains a single T:System.Runtime.Remoting.Activation.UrlAttribute object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation. |
T:System.ArgumentNullException | typeName is null . |
T:System.MissingMethodException | No matching public constructor was found. |
T:System.TypeLoadException | typename was not found in assemblyName . |
T:System.IO.FileNotFoundException | assemblyName was not found. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Runtime.InteropServices.InvalidComObjectException | The COM type was not obtained through Overload:System.Type.GetTypeFromProgID or Overload:System.Type.GetTypeFromCLSID. |
T:System.NotSupportedException | Creation of T:System.TypedReference, T:System.ArgIterator, T:System.Void, and T:System.RuntimeArgumentHandle types, or arrays of those types, is not supported.-or- activationAttributes is not an empty array, and the type being created does not derive from T:System.MarshalByRefObject.-or- activationAttributes is not a T:System.Runtime.Remoting.Activation.UrlAttributearray. |
T:System.BadImageFormatException | assemblyName is not a valid assembly. -or-The common language runtime (CLR) version 2.0 or later is currently loaded, and assemblyName was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0. |
T:System.IO.FileLoadException | An assembly or module was loaded twice with two different evidences. -or-The assembly name or code base is invalid. |
T:System.Reflection.TargetInvocationException | An error occurred when attempting remote activation in a target specified in activationAttributes . |
Definition at line 260 of file Activator.cs.
|
static |
Creates an instance of the specified type using that type's default constructor.
type | The type of object to create. |
nonPublic | true if a public or nonpublic default constructor can match; false if only a public default constructor can match. |
T:System.ArgumentNullException | type is null . |
T:System.ArgumentException | type is not a RuntimeType . -or- type is an open generic type (that is, the P:System.Type.ContainsGenericParameters property returns true ). |
T:System.NotSupportedException | type cannot be a T:System.Reflection.Emit.TypeBuilder.-or- Creation of T:System.TypedReference, T:System.ArgIterator, T:System.Void, and T:System.RuntimeArgumentHandle types, or arrays of those types, is not supported. -or- The assembly that contains type is a dynamic assembly that was created with F:System.Reflection.Emit.AssemblyBuilderAccess.Save. |
T:System.Reflection.TargetInvocationException | The constructor being called throws an exception. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Runtime.InteropServices.InvalidComObjectException | The COM type was not obtained through Overload:System.Type.GetTypeFromProgID or Overload:System.Type.GetTypeFromCLSID. |
T:System.MissingMethodException | No matching public constructor was found. |
T:System.Runtime.InteropServices.COMException | type is a COM object but the class identifier used to obtain the type is invalid, or the identified class is not registered. |
T:System.TypeLoadException | type is not a valid type. |
Definition at line 289 of file Activator.cs.
|
static |
Creates an instance of the type whose name is specified, using the named assembly and the constructor that best matches the specified parameters.
assemblyName | The name of the assembly where the type named typeName is sought. If assemblyName is null , the executing assembly is searched. |
typeName | The fully qualified name of the preferred type. |
ignoreCase | true to specify that the search for typeName is not case-sensitive; false to specify that the search is case-sensitive. |
bindingAttr | A combination of zero or more bit flags that affect the search for the typeName constructor. If bindingAttr is zero, a case-sensitive search for public constructors is conducted. |
binder | An object that uses bindingAttr and args to seek and identify the typeName constructor. If binder is null , the default binder is used. |
args | An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If args is an empty array or null , the constructor that takes no parameters (the default constructor) is invoked. |
culture | Culture-specific information that governs the coercion of args to the formal types declared for the typeName constructor. If culture is null , the T:System.Globalization.CultureInfo for the current thread is used. |
activationAttributes | An array of one or more attributes that can participate in activation. This is typically an array that contains a single T:System.Runtime.Remoting.Activation.UrlAttribute object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation. |
securityInfo | Information used to make security policy decisions and grant code permissions. |
T:System.ArgumentNullException | typeName is null . |
T:System.MissingMethodException | No matching constructor was found. |
T:System.TypeLoadException | typename was not found in assemblyName . |
T:System.IO.FileNotFoundException | assemblyName was not found. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Reflection.TargetInvocationException | The constructor, which was invoked through reflection, threw an exception. |
T:System.Runtime.InteropServices.InvalidComObjectException | The COM type was not obtained through Overload:System.Type.GetTypeFromProgID or Overload:System.Type.GetTypeFromCLSID. |
T:System.NotSupportedException | Creation of T:System.TypedReference, T:System.ArgIterator, T:System.Void, and T:System.RuntimeArgumentHandle types, or arrays of those types, is not supported.-or- activationAttributes is not an empty array, and the type being created does not derive from T:System.MarshalByRefObject. -or-The constructor that best matches args has varargs arguments. |
T:System.BadImageFormatException | assemblyName is not a valid assembly. -or-The common language runtime (CLR) version 2.0 or later is currently loaded, and assemblyName was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0. |
T:System.IO.FileLoadException | An assembly or module was loaded twice with two different evidences. -or-The assembly name or code base is invalid. |
Definition at line 400 of file Activator.cs.
|
static |
Creates an instance of the type whose name is specified, using the named assembly and the constructor that best matches the specified parameters.
assemblyName | The name of the assembly where the type named typeName is sought. If assemblyName is null , the executing assembly is searched. |
typeName | The fully qualified name of the preferred type. |
ignoreCase | true to specify that the search for typeName is not case-sensitive; false to specify that the search is case-sensitive. |
bindingAttr | A combination of zero or more bit flags that affect the search for the typeName constructor. If bindingAttr is zero, a case-sensitive search for public constructors is conducted. |
binder | An object that uses bindingAttr and args to seek and identify the typeName constructor. If binder is null , the default binder is used. |
args | An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If args is an empty array or null , the constructor that takes no parameters (the default constructor) is invoked. |
culture | Culture-specific information that governs the coercion of args to the formal types declared for the typeName constructor. If culture is null , the T:System.Globalization.CultureInfo for the current thread is used. |
activationAttributes | An array of one or more attributes that can participate in activation. This is typically an array that contains a single T:System.Runtime.Remoting.Activation.UrlAttribute object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation. |
T:System.ArgumentNullException | typeName is null . |
T:System.MissingMethodException | No matching constructor was found. |
T:System.TypeLoadException | typename was not found in assemblyName . |
T:System.IO.FileNotFoundException | assemblyName was not found. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Reflection.TargetInvocationException | The constructor, which was invoked through reflection, threw an exception. |
T:System.Runtime.InteropServices.InvalidComObjectException | The COM type was not obtained through Overload:System.Type.GetTypeFromProgID or Overload:System.Type.GetTypeFromCLSID. |
T:System.NotSupportedException | Creation of T:System.TypedReference, T:System.ArgIterator, T:System.Void, and T:System.RuntimeArgumentHandle types, or arrays of those types, is not supported.-or- activationAttributes is not an empty array, and the type being created does not derive from T:System.MarshalByRefObject. -or-The constructor that best matches args has varargs arguments. |
T:System.BadImageFormatException | assemblyName is not a valid assembly. -or-The common language runtime (CLR) version 2.0 or later is currently loaded, and assemblyName was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0. |
T:System.IO.FileLoadException | An assembly or module was loaded twice with two different evidences. -or-The assembly name or code base is invalid. |
Definition at line 435 of file Activator.cs.
|
static |
Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly and default constructor.
domain | The remote domain where the type named typeName is created. |
assemblyName | The name of the assembly where the type named typeName is sought. If assemblyName is null , the executing assembly is searched. |
typeName | The fully qualified name of the preferred type. |
T:System.ArgumentNullException | typeName or domain is null . |
T:System.MissingMethodException | No matching public constructor was found. |
T:System.TypeLoadException | typename was not found in assemblyName . |
T:System.IO.FileNotFoundException | assemblyName was not found. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract type. -or-This member was invoked with a late-binding mechanism. |
T:System.Reflection.TargetInvocationException | The constructor, which was invoked through reflection, threw an exception. |
T:System.Runtime.InteropServices.InvalidComObjectException | The COM type was not obtained through Overload:System.Type.GetTypeFromProgID or Overload:System.Type.GetTypeFromCLSID. |
T:System.NotSupportedException | Creation of T:System.TypedReference, T:System.ArgIterator, T:System.Void, and T:System.RuntimeArgumentHandle types, or arrays of those types, is not supported. |
T:System.BadImageFormatException | assemblyName is not a valid assembly. -or-The common language runtime (CLR) version 2.0 or later is currently loaded, and assemblyName was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0. |
T:System.IO.FileLoadException | An assembly or module was loaded twice with two different evidences. -or-The assembly name or code base is invalid. |
Definition at line 588 of file Activator.cs.
|
static |
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.
domain | The domain where the type named typeName is created. |
assemblyName | The name of the assembly where the type named typeName is sought. If assemblyName is null , the executing assembly is searched. |
typeName | The fully qualified name of the preferred type. |
ignoreCase | true to specify that the search for typeName is not case-sensitive; false to specify that the search is case-sensitive. |
bindingAttr | A combination of zero or more bit flags that affect the search for the typeName constructor. If bindingAttr is zero, a case-sensitive search for public constructors is conducted. |
binder | An object that uses bindingAttr and args to seek and identify the typeName constructor. If binder is null , the default binder is used. |
args | An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If args is an empty array or null , the constructor that takes no parameters (the default constructor) is invoked. |
culture | Culture-specific information that governs the coercion of args to the formal types declared for the typeName constructor. If culture is null , the T:System.Globalization.CultureInfo for the current thread is used. |
activationAttributes | An array of one or more attributes that can participate in activation. This is typically an array that contains a single T:System.Runtime.Remoting.Activation.UrlAttribute object. The T:System.Runtime.Remoting.Activation.UrlAttribute specifies the URL that is required to activate a remote object. |
securityAttributes | Information used to make security policy decisions and grant code permissions. |
T:System.ArgumentNullException | domain or typeName is null . |
T:System.MissingMethodException | No matching constructor was found. |
T:System.TypeLoadException | typename was not found in assemblyName . |
T:System.IO.FileNotFoundException | assemblyName was not found. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Reflection.TargetInvocationException | The constructor, which was invoked through reflection, threw an exception. |
T:System.Runtime.InteropServices.InvalidComObjectException | The COM type was not obtained through Overload:System.Type.GetTypeFromProgID or Overload:System.Type.GetTypeFromCLSID. |
T:System.NotSupportedException | Creation of T:System.TypedReference, T:System.ArgIterator, T:System.Void, and T:System.RuntimeArgumentHandle types, or arrays of those types, is not supported.-or- activationAttributes is not an empty array, and the type being created does not derive from T:System.MarshalByRefObject. -or-The constructor that best matches args has varargs arguments. |
T:System.BadImageFormatException | assemblyName is not a valid assembly. -or-The common language runtime (CLR) version 2.0 or later is currently loaded, and assemblyName was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0. |
T:System.IO.FileLoadException | An assembly or module was loaded twice with two different evidences. -or-The assembly name or code base is invalid. |
Definition at line 628 of file Activator.cs.
|
static |
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.
domain | The domain where the type named typeName is created. |
assemblyName | The name of the assembly where the type named typeName is sought. If assemblyName is null , the executing assembly is searched. |
typeName | The fully qualified name of the preferred type. |
ignoreCase | true to specify that the search for typeName is not case-sensitive; false to specify that the search is case-sensitive. |
bindingAttr | A combination of zero or more bit flags that affect the search for the typeName constructor. If bindingAttr is zero, a case-sensitive search for public constructors is conducted. |
binder | An object that uses bindingAttr and args to seek and identify the typeName constructor. If binder is null , the default binder is used. |
args | An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If args is an empty array or null , the constructor that takes no parameters (the default constructor) is invoked. |
culture | Culture-specific information that governs the coercion of args to the formal types declared for the typeName constructor. If culture is null , the T:System.Globalization.CultureInfo for the current thread is used. |
activationAttributes | An array of one or more attributes that can participate in activation. This is typically an array that contains a single T:System.Runtime.Remoting.Activation.UrlAttribute object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation. |
T:System.ArgumentNullException | domain or typeName is null . |
T:System.MissingMethodException | No matching constructor was found. |
T:System.TypeLoadException | typename was not found in assemblyName . |
T:System.IO.FileNotFoundException | assemblyName was not found. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Reflection.TargetInvocationException | The constructor, which was invoked through reflection, threw an exception. |
T:System.Runtime.InteropServices.InvalidComObjectException | The COM type was not obtained through Overload:System.Type.GetTypeFromProgID or Overload:System.Type.GetTypeFromCLSID. |
T:System.NotSupportedException | Creation of T:System.TypedReference, T:System.ArgIterator, T:System.Void, and T:System.RuntimeArgumentHandle types, or arrays of those types, is not supported.-or- activationAttributes is not an empty array, and the type being created does not derive from T:System.MarshalByRefObject. -or-The constructor that best matches args has varargs arguments. |
T:System.BadImageFormatException | assemblyName is not a valid assembly. -or-The common language runtime (CLR) version 2.0 or later is currently loaded, and assemblyName was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0. |
T:System.IO.FileLoadException | An assembly or module was loaded twice with two different evidences. -or-The assembly name or code base is invalid. |
Definition at line 670 of file Activator.cs.
|
static |
Creates an instance of the type designated by the specified T:System.ActivationContext object.
activationContext | An activation context object that specifies the object to create. |
Definition at line 792 of file Activator.cs.
|
static |
Creates an instance of the type that is designated by the specified T:System.ActivationContext object and activated with the specified custom activation data.
activationContext | An activation context object that specifies the object to create. |
activationCustomData | An array of Unicode strings that contain custom activation data. |
Definition at line 807 of file Activator.cs.
|
static |
Creates an instance of the type designated by the specified generic type parameter, using the parameterless constructor.
T | The type to create. |
T:System.MissingMethodException | In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.MissingMemberException, instead.The type that is specified for T does not have a parameterless constructor. |
Definition at line 311 of file Activator.cs.
|
static |
Creates an instance of the type whose name is specified, using the named assembly file and default constructor.
assemblyFile | The name of a file that contains an assembly where the type named typeName is sought. |
typeName | The name of the preferred type. |
T:System.ArgumentNullException | typeName is null . |
T:System.MissingMethodException | No matching public constructor was found. |
T:System.TypeLoadException | typename was not found in assemblyFile . |
T:System.IO.FileNotFoundException | assemblyFile was not found. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Reflection.TargetInvocationException | The constructor, which was invoked through reflection, threw an exception. |
T:System.Security.SecurityException | The caller does have the required T:System.Security.Permissions.FileIOPermission. |
T:System.BadImageFormatException | assemblyFile is not a valid assembly. -or-The common language runtime (CLR) version 2.0 or later is currently loaded, and assemblyName was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0. |
Definition at line 339 of file Activator.cs.
|
static |
Creates an instance of the type whose name is specified, using the named assembly file and default constructor.
assemblyFile | The name of a file that contains an assembly where the type named typeName is sought. |
typeName | The name of the preferred type. |
activationAttributes | An array of one or more attributes that can participate in activation. This is typically an array that contains a single T:System.Runtime.Remoting.Activation.UrlAttribute object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation. |
T:System.ArgumentNullException | typeName is null . |
T:System.MissingMethodException | No matching public constructor was found. |
T:System.TypeLoadException | typename was not found in assemblyFile . |
T:System.IO.FileNotFoundException | assemblyFile was not found. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Reflection.TargetInvocationException | The constructor, which was invoked through reflection, threw an exception. |
T:System.NotSupportedException | activationAttributes is not an empty array, and the type being created does not derive from T:System.MarshalByRefObject. |
T:System.Security.SecurityException | The caller does have the required T:System.Security.Permissions.FileIOPermission. |
T:System.BadImageFormatException | assemblyFile is not a valid assembly. -or-The common language runtime (CLR) version 2.0 or later is currently loaded, and assemblyName was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0. |
Definition at line 364 of file Activator.cs.
|
static |
Creates an instance of the type whose name is specified, using the named assembly file and the constructor that best matches the specified parameters.
assemblyFile | The name of a file that contains an assembly where the type named typeName is sought. |
typeName | The name of the preferred type. |
ignoreCase | true to specify that the search for typeName is not case-sensitive; false to specify that the search is case-sensitive. |
bindingAttr | A combination of zero or more bit flags that affect the search for the typeName constructor. If bindingAttr is zero, a case-sensitive search for public constructors is conducted. |
binder | An object that uses bindingAttr and args to seek and identify the typeName constructor. If binder is null , the default binder is used. |
args | An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If args is an empty array or null , the constructor that takes no parameters (the default constructor) is invoked. |
culture | Culture-specific information that governs the coercion of args to the formal types declared for the typeName constructor. If culture is null , the T:System.Globalization.CultureInfo for the current thread is used. |
activationAttributes | An array of one or more attributes that can participate in activation. This is typically an array that contains a single T:System.Runtime.Remoting.Activation.UrlAttribute object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation. |
securityInfo | Information used to make security policy decisions and grant code permissions. |
T:System.ArgumentNullException | typeName is null . |
T:System.MissingMethodException | No matching constructor was found. |
T:System.TypeLoadException | typename was not found in assemblyFile . |
T:System.IO.FileNotFoundException | assemblyFile was not found. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Reflection.TargetInvocationException | The constructor, which was invoked through reflection, threw an exception. |
T:System.Security.SecurityException | The caller does not have the required T:System.Security.Permissions.FileIOPermission. |
T:System.NotSupportedException | activationAttributes is not an empty array, and the type being created does not derive from T:System.MarshalByRefObject. |
T:System.BadImageFormatException | assemblyFile is not a valid assembly. -or-The common language runtime (CLR) version 2.0 or later is currently loaded, and assemblyName was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0. |
Definition at line 515 of file Activator.cs.
|
static |
Creates an instance of the type whose name is specified, using the named assembly file and the constructor that best matches the specified parameters.
assemblyFile | The name of a file that contains an assembly where the type named typeName is sought. |
typeName | The name of the preferred type. |
ignoreCase | true to specify that the search for typeName is not case-sensitive; false to specify that the search is case-sensitive. |
bindingAttr | A combination of zero or more bit flags that affect the search for the typeName constructor. If bindingAttr is zero, a case-sensitive search for public constructors is conducted. |
binder | An object that uses bindingAttr and args to seek and identify the typeName constructor. If binder is null , the default binder is used. |
args | An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If args is an empty array or null , the constructor that takes no parameters (the default constructor) is invoked. |
culture | Culture-specific information that governs the coercion of args to the formal types declared for the typeName constructor. If culture is null , the T:System.Globalization.CultureInfo for the current thread is used. |
activationAttributes | An array of one or more attributes that can participate in activation. This is typically an array that contains a single T:System.Runtime.Remoting.Activation.UrlAttribute object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation. |
T:System.ArgumentNullException | typeName is null . |
T:System.MissingMethodException | No matching constructor was found. |
T:System.TypeLoadException | typename was not found in assemblyFile . |
T:System.IO.FileNotFoundException | assemblyFile was not found. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Reflection.TargetInvocationException | The constructor, which was invoked through reflection, threw an exception. |
T:System.Security.SecurityException | The caller does not have the required T:System.Security.Permissions.FileIOPermission. |
T:System.NotSupportedException | activationAttributes is not an empty array, and the type being created does not derive from T:System.MarshalByRefObject. |
T:System.BadImageFormatException | assemblyFile is not a valid assembly. -or-The common language runtime (CLR) version 2.0 or later is currently loaded, and assemblyName was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0. |
Definition at line 550 of file Activator.cs.
|
static |
Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly file and default constructor.
domain | The remote domain where the type named typeName is created. |
assemblyFile | The name of a file that contains an assembly where the type named typeName is sought. |
typeName | The name of the preferred type. |
T:System.ArgumentNullException | domain or typeName is null . |
T:System.MissingMethodException | No matching public constructor was found. |
T:System.TypeLoadException | typename was not found in assemblyFile . |
T:System.IO.FileNotFoundException | assemblyFile was not found. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Reflection.TargetInvocationException | The constructor, which was invoked through reflection, threw an exception. |
T:System.Security.SecurityException | The caller does have the required T:System.Security.Permissions.FileIOPermission. |
T:System.BadImageFormatException | assemblyFile is not a valid assembly. -or-The common language runtime (CLR) version 2.0 or later is currently loaded, and assemblyName was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0. |
Definition at line 698 of file Activator.cs.
|
static |
Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly file and the constructor that best matches the specified parameters.
domain | The remote domain where the type named typeName is created. |
assemblyFile | The name of a file that contains an assembly where the type named typeName is sought. |
typeName | The name of the preferred type. |
ignoreCase | true to specify that the search for typeName is not case-sensitive; false to specify that the search is case-sensitive. |
bindingAttr | A combination of zero or more bit flags that affect the search for the typeName constructor. If bindingAttr is zero, a case-sensitive search for public constructors is conducted. |
binder | An object that uses bindingAttr and args to seek and identify the typeName constructor. If binder is null , the default binder is used. |
args | An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If args is an empty array or null , the constructor that takes no parameters (the default constructor) is invoked. |
culture | Culture-specific information that governs the coercion of args to the formal types declared for the typeName constructor. If culture is null , the T:System.Globalization.CultureInfo for the current thread is used. |
activationAttributes | An array of one or more attributes that can participate in activation. This is typically an array that contains a single T:System.Runtime.Remoting.Activation.UrlAttribute object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation. |
securityAttributes | Information used to make security policy decisions and grant code permissions. |
T:System.ArgumentNullException | domain or typeName is null . |
T:System.MissingMethodException | No matching constructor was found. |
T:System.TypeLoadException | typename was not found in assemblyFile . |
T:System.IO.FileNotFoundException | assemblyFile was not found. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Reflection.TargetInvocationException | The constructor, which was invoked through reflection, threw an exception. |
T:System.Security.SecurityException | The caller does have the required T:System.Security.Permissions.FileIOPermission. |
T:System.NotSupportedException | activationAttributes is not an empty array, and the type being created does not derive from T:System.MarshalByRefObject. |
T:System.BadImageFormatException | assemblyFile is not a valid assembly. -or-The common language runtime (CLR) version 2.0 or later is currently loaded, and assemblyName was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0. |
Definition at line 737 of file Activator.cs.
|
static |
Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly file and the constructor that best matches the specified parameters.
domain | The remote domain where the type named typeName is created. |
assemblyFile | The name of a file that contains an assembly where the type named typeName is sought. |
typeName | The name of the preferred type. |
ignoreCase | true to specify that the search for typeName is not case-sensitive; false to specify that the search is case-sensitive. |
bindingAttr | A combination of zero or more bit flags that affect the search for the typeName constructor. If bindingAttr is zero, a case-sensitive search for public constructors is conducted. |
binder | An object that uses bindingAttr and args to seek and identify the typeName constructor. If binder is null , the default binder is used. |
args | An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If args is an empty array or null , the constructor that takes no parameters (the default constructor) is invoked. |
culture | Culture-specific information that governs the coercion of args to the formal types declared for the typeName constructor. If culture is null , the T:System.Globalization.CultureInfo for the current thread is used. |
activationAttributes | An array of one or more attributes that can participate in activation. This is typically an array that contains a single T:System.Runtime.Remoting.Activation.UrlAttribute object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation. |
T:System.ArgumentNullException | domain or typeName is null . |
T:System.MissingMethodException | No matching constructor was found. |
T:System.TypeLoadException | typename was not found in assemblyFile . |
T:System.IO.FileNotFoundException | assemblyFile was not found. |
T:System.MethodAccessException | The caller does not have permission to call this constructor. |
T:System.MemberAccessException | Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism. |
T:System.Reflection.TargetInvocationException | The constructor, which was invoked through reflection, threw an exception. |
T:System.Security.SecurityException | The caller does have the required T:System.Security.Permissions.FileIOPermission. |
T:System.NotSupportedException | activationAttributes is not an empty array, and the type being created does not derive from T:System.MarshalByRefObject. |
T:System.BadImageFormatException | assemblyFile is not a valid assembly. -or- assemblyName was compiled for a version of the common language runtime that is later than the version that is currently loaded. |
Definition at line 779 of file Activator.cs.
|
static |
Creates a proxy for the well-known object indicated by the specified type and URL.
type | The type of the well-known object to which you want to connect. |
url | The URL of the well-known object. |
T:System.ArgumentNullException | type or url is null . |
T:System.Runtime.Remoting.RemotingException | type is not marshaled by reference and is not an interface. |
T:System.MemberAccessException | This member was invoked with a late-binding mechanism. |
Definition at line 891 of file Activator.cs.
|
static |
Creates a proxy for the well-known object indicated by the specified type, URL, and channel data.
type | The type of the well-known object to which you want to connect. |
url | The URL of the well-known object. |
state | Channel-specific data or null . |
T:System.ArgumentNullException | type or url is null . |
T:System.Runtime.Remoting.RemotingException | type is not marshaled by reference and is not an interface. |
T:System.MemberAccessException | This member was invoked with a late-binding mechanism. |
Definition at line 907 of file Activator.cs.