[Serializable] |
CodeBase | Read-only Gets the location of the assembly as specified originally, for example, in an AssemblyName object. |
EntryPoint | Read-only Gets the entry point of this assembly. |
EscapedCodeBase | Read-only Gets the URI, including escape characters, that represents the codebase. |
Evidence | Read-only Gets the evidence for this assembly. |
FullName | Read-only Gets the display name of the assembly. |
GlobalAssemblyCache | Read-only Gets a value indicating whether the assembly was loaded from the global assembly cache. |
Location | Read-only Gets the location, in codebase format, of the loaded file that contains the manifest if not shadow-copied. |
CreateInstance | Overloaded:CreateInstance(string typeName) Locates the specified type from this assembly and creates an instance of it using the system activator, using case-sensitive search. |
CreateInstance | Overloaded:CreateInstance(string typeName, bool ignoreCase) Locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search. |
CreateInstance | Overloaded:CreateInstance(string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes) Locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search and having the specified culture, arguments, and binding and activation attributes. |
CreateQualifiedName | Creates the name of a type qualified by the display name of its assembly. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetAssembly | Gets the assembly in which the specified class is defined. |
GetCallingAssembly | Returns the Assembly of the method that invoked the currently executing method. |
GetCustomAttributes | Overloaded:GetCustomAttributes(bool inherit) Gets all the custom attributes for this assembly. |
GetCustomAttributes | Overloaded:GetCustomAttributes(Type attributeType, bool inherit) Gets the custom attributes for this assembly as specified by type. |
GetEntryAssembly | Gets the process executable in the default application domain. In other application domains, this is the first executable that was executed by AppDomain.ExecuteAssembly. |
GetExecutingAssembly | Gets the Assembly that the current code is running from. |
GetExportedTypes | Gets the exported types defined in this assembly. |
GetFile | Gets a FileStream for the specified file in the file table of the manifest of this assembly. |
GetFiles | Overloaded:GetFiles() Gets the files in the file table of an assembly manifest. |
GetFiles | Overloaded:GetFiles(bool getResourceModules) Gets the files in the file table of an assembly manifest, specifying whether to include resource modules. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetLoadedModules | Overloaded:GetLoadedModules() Gets all the loaded modules that are part of this assembly. |
GetLoadedModules | Overloaded:GetLoadedModules(bool getResourceModules) Gets all the loaded modules that are part of this assembly, specifying whether to include resource modules. |
GetManifestResourceInfo | Returns information about how the given resource has been persisted. |
GetManifestResourceNames | Returns the names of all the resources in this assembly. |
GetManifestResourceStream | Overloaded:GetManifestResourceStream(string name) Loads the specified manifest resource from this assembly. |
GetManifestResourceStream | Overloaded:GetManifestResourceStream(Type type, string name) Loads the specified manifest resource, scoped by the namespace of the specified type, from this assembly. |
GetModule | Gets the specified module in this assembly. |
GetModules | Overloaded:GetModules() Gets all the modules that are part of this assembly. |
GetModules | Overloaded:GetModules(bool getResourceModules) Gets all the modules that are part of this assembly, specifying whether to include resource modules. |
GetName | Overloaded:GetName() Gets an AssemblyName for this assembly. |
GetName | Overloaded:GetName(bool copiedName) Gets an AssemblyName for this assembly, setting the codebase as specified by copiedName. |
GetObjectData | Gets serialization information with all of the data needed to reinstantiate this assembly. |
GetReferencedAssemblies | Gets the AssemblyName objects for all the assemblies referenced by this assembly. |
GetSatelliteAssembly | Overloaded:GetSatelliteAssembly(CultureInfo culture) Gets the satellite assembly for the specified culture. |
GetSatelliteAssembly | Overloaded:GetSatelliteAssembly(CultureInfo culture, Version version) Gets the specified version of the satellite assembly for the specified culture. |
GetType (inherited from System.Object) |
Overloaded:GetType() See base class member description: System.Object.GetTypeDerived from System.Object, the primary base class for all objects. |
GetType | Overloaded:GetType(string name) Gets the Type object with the specified name in the assembly instance. |
GetType | Overloaded:GetType(string name, bool throwOnError) Gets the Type object with the specified name in the assembly instance and optionally throws an exception. |
GetType | Overloaded:GetType(string name, bool throwOnError, bool ignoreCase) Gets the Type object with the specified name in the assembly instance, with the options of ignoring the case, and throwing an exception. |
GetTypes | Gets the types defined in this assembly. |
IsDefined | Indicates whether a custom attribute identified by the specified Type is defined. |
Load | Overloaded:Load(AssemblyName assemblyRef) Loads an assembly given its AssemblyName. |
Load | Overloaded:Load(byte[] rawAssembly) Loads the assembly with a Common Object File Format (COFF)-based image containing an emitted assembly. The assembly is loaded into the domain of the caller. |
Load | Overloaded:Load(string assemblyString) Loads an assembly given its display name. |
Load | Overloaded:Load(AssemblyName assemblyRef, Evidence assemblySecurity) Loads the assembly with a Common Object File Format (COFF)-based image containing an emitted assembly. The assembly is loaded into the domain of the caller using the supplied evidence. |
Load | Overloaded:Load(byte[] rawAssembly, byte[] rawSymbolStore) Loads the assembly with a Common Object File Format (COFF)-based image containing an emitted assembly. |
Load | Overloaded:Load(string assemblyString, Evidence assemblySecurity) Loads an assembly given its display name, loading the assembly into the domain of the caller using the supplied evidence. |
Load | Overloaded:Load(byte[] rawAssembly, byte[] rawSymbolStore, Evidence securityEvidence) Loads the assembly with a Common Object File Format (COFF)-based image containing an emitted assembly. |
LoadFrom | Overloaded:LoadFrom(string assemblyFile) Loads an assembly given its file name or path. |
LoadFrom | Overloaded:LoadFrom(string assemblyFile, Evidence securityEvidence) Loads an assembly given its file name or path and supplying security evidence. |
LoadModule | Overloaded:LoadModule(string moduleName, byte[] rawModule) Loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file. |
LoadModule | Overloaded:LoadModule(string moduleName, byte[] rawModule, byte[] rawSymbolStore) Loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file. The raw bytes representing the symbols for the module are also loaded. |
LoadWithPartialName | Overloaded:LoadWithPartialName(string partialName) Loads an assembly from the application directory or from the global assembly cache using a partial name. |
LoadWithPartialName | Overloaded:LoadWithPartialName(string partialName, Evidence securityEvidence) Loads an assembly from the application directory or from the global assembly cache using a partial name. The assembly is loaded into the domain of the caller using the supplied evidence. |
ToString | Overridden: Returns the full name of the assembly, also known as the display name. |
ModuleResolve | Occurs when the common language runtime class loader cannot resolve a reference to an internal module of an assembly through normal means. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
public virtual string CodeBase {get;}
|
Exception Type | Condition |
---|---|
SecurityException | The caller does not have the required permission. |
If the assembly was loaded as a byte array, this property returns the location of the caller of the Assembly.Load method, not the assembly.
Assembly SampleAssembly; // Instantiate a target object. Int32 Integer1 = new Int32(); Type Type1; // Set the Type instance to the target class type. Type1 = Integer1.GetType(); // Instantiate an Assembly class to the assembly housing the Integer type. SampleAssembly = Assembly.GetAssembly(Integer1.GetType()); // Gets the location of the assembly using file: protocol. Console.WriteLine("CodeBase=" + SampleAssembly.CodeBase);
public virtual MethodInfo EntryPoint {get;}
|
public virtual string EscapedCodeBase {get;}
|
Exception Type | Condition |
---|---|
SecurityException | The caller does not have the required permission. |
public virtual Evidence Evidence {get;}
|
public virtual string FullName {get;}
|
Assembly SampleAssembly; // Instantiate a target object. Int32 Integer1 = new Int32(); Type Type1; // Set the Type instance to the target class type. Type1 = Integer1.GetType(); // Instantiate an Assembly class to the assembly housing the Integer type. SampleAssembly = Assembly.GetAssembly(Integer1.GetType()); // Write the display name of assembly including base name and version. Console.WriteLine("FullName=" + SampleAssembly.FullName);
public bool GlobalAssemblyCache {get;}
|
public virtual string Location {get;}
|
Exception Type | Condition |
---|---|
SecurityException | The caller does not have the required permission. |
Assembly SampleAssembly; // Instantiate a target object. Int32 Integer1 = new Int32(); Type Type1; // Set the Type instance to the target class type. Type1 = Integer1.GetType(); // Instantiate an Assembly class to the assembly housing the Integer type. SampleAssembly = Assembly.GetAssembly(Integer1.GetType()); // Display the physical location of the assembly containing the manifest. Console.WriteLine("Location=" + SampleAssembly.Location);
typeName
Exception Type | Condition |
---|---|
ArgumentException | typeName is the empty string ("") or "\0anything". |
ArgumentNullException | typeName is null. |
typeName
ignoreCase
Exception Type | Condition |
---|---|
ArgumentException | typeName is the empty string ("") or "\0anything". |
ArgumentNullException | typeName is null. |
public object CreateInstance( |
typeName
ignoreCase
bindingAttr
binder
args
culture
activationAttributes
URLAttribute(http://hostname/appname/objectURI)
An array of type Object containing one or more activation attributes that can participate in the activation. An example of an activation attribute is:URLAttribute(http://hostname/appname/objectURI)
Exception Type | Condition |
---|---|
ArgumentException | typeName is the empty string ("") or "\0anything". |
ArgumentNullException | typeName is null. |
MissingFieldException | The constructor cannot be found. |
assemblyName
typeName
<FullTypeName>, <AssemblyDisplayName>
See AssemblyName for a description of the format of the display name of an assembly.
~Assembly(); |
type
Exception Type | Condition |
---|---|
ArgumentNullException | type is null. |
Assembly SampleAssembly; // Instantiate a target object. Int32 Integer1 = new Int32(); Type Type1; // Set the Type instance to the target class type. Type1 = Integer1.GetType(); // Instantiate an Assembly class to the assembly housing the Integer type. SampleAssembly = Assembly.GetAssembly(Integer1.GetType()); // Gets the location of the assembly using file: protocol. Console.WriteLine("CodeBase=" + SampleAssembly.CodeBase);
public static Assembly GetCallingAssembly(); |
Assembly SampleAssembly; // Instantiate a target object. Int32 Integer1 = new Int32(); Type Type1; // Set the Type instance to the target class type. Type1 = Integer1.GetType(); // Instantiate an Assembly class to the assembly housing the Integer type. SampleAssembly = Assembly.GetAssembly(Integer1.GetType()); // Display the name of the assembly that is calling the method. Console.WriteLine("GetCallingAssembly=" + Assembly.GetCallingAssembly().FullName);
inherit
A pseudo-attribute indicates bits of the core metadata that must be set when the attribute is present. Unlike a custom attribute that extends the metadata for a type and is saved along with the type, a pseudo-attribute modifies the metadata for the type and then is discarded. Some of the resulting bits cannot be accessed using existing reflection APIs.
The following table summarizes the different pseudo-attributes and the accessors for the bits that are available in reflection.
Pseudo-Attribute | Metadata Bits | Reflection Accessor |
---|---|---|
DllImportAttribute | CorPInvokeMap DLL name | No accessor for PInvokeMap for ordinary method/global method attributes. No accessor for DLL name. |
GuidAttribute | Stored as a real custom attribute. | Accessed as a real custom attribute. |
ComImportAttribute | CorTypeAttr.tdImport | Type.Attributes.Import |
SerializableAttribute | CorTypeAttr.tdSerializable | Type.Attributes.Serializable |
NonSerializedAttribute | CorFieldAttr.fdNotSerialized | FieldInfo.Attributes.NotSerialized |
MethodImplAttribute | CorMethodImpl | MethodInfo.GetMethodImplementationFlags() ConstructorInfo.GetMethodImplementationFlags() |
MarshalAsAttribute | Various bits. | No accessor. |
PreserveSigAttribute | CorMethodImpl.miOLE | MethodInfo.GetMethodImplementationFlags().OLE ConstructorInfo.GetMethodImplementationFlags().OLE |
InAttribute | CorParamAttr.pdIn | ParameterInfo.Attributes.In |
OutAttribute | CorParamAttr.pdOut | ParameterInfo.Attributes.Out |
StructLayoutAttribute | CorTypeAttr.tdLayoutSequential CorTypeAttr.tdExplicitLayout CorTypeAttr.tdAnsiClass CorTypeAttr.tdUnicodeClass CorTypeAttr.tdAutoClass Class packing. | Type.Attributes.LayoutSequential Type.Attributes.ExplicitLayout Type.Attributes.AnsiClass Type.Attributes.UnicodeClass Type.Attributes.AutoClass No accessor. |
FieldOffsetAttribute | Field offset. | No accessor. |
AssemblyLoadAttribute | CorAssemblyFlags | No accessor or enumerator. |
attributeType
inherit
Exception Type | Condition |
---|---|
ArgumentNullException | attributeType is null. |
ArgumentException | attributeType is not a runtime type. |
public static Assembly GetEntryAssembly(); |
public static Assembly GetExecutingAssembly(); |
Assembly SampleAssembly; // Instantiate a target object. Int32 Integer1 = new Int32(); Type Type1; // Set the Type instance to the target class type. Type1 = Integer1.GetType(); // Instantiate an Assembly class to the assembly housing the Integer type. SampleAssembly = Assembly.GetAssembly(Integer1.GetType()); // Display the name of the assembly currently executing Console.WriteLine("GetExecutingAssembly=" + Assembly.GetExecutingAssembly().FullName);
public virtual Type[] GetExportedTypes(); |
public virtual FileStream GetFile( |
name
Exception Type | Condition |
---|---|
FileLoadException | A file that was found could not be loaded. |
ArgumentNullException | The name parameter is null. |
SecurityException | The caller does not have the required permission. |
public virtual FileStream[] GetFiles(); |
public virtual FileStream[] GetFiles( |
getResourceModules
public virtual int GetHashCode(); |
public Module[] GetLoadedModules(); |
getResourceModules
public virtual ManifestResourceInfo GetManifestResourceInfo( |
resourceName
Exception Type | Condition |
---|---|
ArgumentNullException | resourceName is null. |
public virtual string[] GetManifestResourceNames(); |
name
type
name
name
Classes in the Reflection.Emit namespace emit the scope name for a dynamic module. The scope name can be determined by the Module.ScopeName property. Pass the kind of module you want to Assembly.GetModule. For example, if you want the module that contains the assembly manifest, pass the scope name of the module to GetModule. Otherwise, pass the file name of the module. Assemblies loaded by one of the Load methods that have a byte[] parameter have only one module, and that is the manifest module. Always seek these modules using the scope name.
A type can be retrieved from a specific module using Module.GetType. Calling Module.GetType on the module containing the manifest will not initiate a search of the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call Assembly.GetType.
public Module[] GetModules(); |
Exception Type | Condition |
---|---|
FileNotFoundException | The module to be loaded does not specify a file name extension. |
Assembly mainAssembly = Assembly.GetExecutingAssembly(); Module mainMod = mainAssembly.GetModules()[0];
getResourceModules
public virtual AssemblyName GetName(); |
public virtual AssemblyName GetName( |
copiedName
public virtual void GetObjectData( |
info
context
Exception Type | Condition |
---|---|
ArgumentNullException | info is null. |
public AssemblyName[] GetReferencedAssemblies(); |
public Assembly GetSatelliteAssembly( |
culture
Exception Type | Condition |
---|---|
ArgumentNullException | culture is null. |
FileNotFoundException | The assembly cannot be found. |
FileLoadException | The satellite assembly with a matching file name was found, but the CultureInfo did not match the one specified. |
Call this method to use your current assembly version.
public Assembly GetSatelliteAssembly( |
culture
version
Exception Type | Condition |
---|---|
ArgumentNullException | culture is null. |
FileLoadException | The satellite assembly with a matching file name was found, but the CultureInfo or the version did not match the one specified. |
FileNotFoundException | The assembly cannot be found. |
Call GetSatelliteAssembly to use your current assembly version.
If version is null, the current assembly version is used if both the resource and main assemblies are signed.
public Type GetType(); |
name
Exception Type | Condition |
---|---|
ReflectionTypeLoadException | The type is not in the assembly instance you are calling the method on. |
ArgumentException | name is invalid. |
ArgumentNullException | name is null. |
SecurityException | The caller does not have the required permission. |
name
throwOnError
Exception Type | Condition |
---|---|
ArgumentNullException | name is null. |
name
throwOnError
ignoreCase
Exception Type | Condition |
---|---|
ArgumentNullException | name is null. |
public virtual Type[] GetTypes(); |
Assembly SampleAssembly; SampleAssembly = Assembly.LoadFrom("c:\\Sample.Assembly.dll"); // Obtain a reference to a method known to exist in assembly. MethodInfo Method = SampleAssembly.GetTypes()[0].GetMethod("Method1"); // Obtain a reference to the parameters collection of the MethodInfo instance. ParameterInfo[] Params = Method.GetParameters(); // Display information about method parameters. // Param = sParam1 // Type = System.String // Position = 0 // Optional=False foreach (ParameterInfo Param in Params){ Console.WriteLine("Param=" + Param.Name.ToString()); Console.WriteLine(" Type=" + Param.ParameterType.ToString()); Console.WriteLine(" Position=" + Param.Position.ToString()); Console.WriteLine(" Optional=" + Param.IsOptional.ToString()); }
attributeType
inherit
Exception Type | Condition |
---|---|
ArgumentNullException | attributeType is null. |
public static Assembly Load( |
assemblyRef
Exception Type | Condition |
---|---|
ArgumentNullException | assemblyRef is null. |
FileNotFoundException | assemblyRef is not found. |
BadImageFormatException | assemblyFile is not a valid assembly. |
The Load methods use the default load context, which records the assembly name and assembly instance information for the set of assemblies that is the transitive closure of the assemblies referenced by a managed application. The default load context applies to assemblies that are loaded with a Load method and that use a fully qualified assembly reference.
rawAssembly
Exception Type | Condition |
---|---|
ArgumentNullException | rawAssembly is null. |
BadImageFormatException | rawAssembly is not a valid assembly. |
The Load methods use the default load context, which records the assembly name and assembly instance information for the set of assemblies that is the transitive closure of the assemblies referenced by a managed application. The default load context applies to assemblies that are loaded with a Load method and that use a fully qualified assembly reference.
assemblyString
Exception Type | Condition |
---|---|
ArgumentNullException | assemblyString is null. |
FileNotFoundException | assemblyString is not found. |
BadImageFormatException | assemblyFile is not a valid assembly. |
Reflecting on Managed Extensions for C++ executable files might throw a BadImageFormatException. This is most likely caused by C++ compiler stripping the relocation addresses or the .Reloc section from your executable file. To preserve the .reloc address for your C++ executable file, specify /fixed:no when you are linking.
Assembly SampleAssembly; // Load the assembly by providing the type name. SampleAssembly = Assembly.Load("System.Data"); foreach (String Resource in SampleAssembly.GetManifestResourceNames()){ Console.WriteLine(Resource); }
public static Assembly Load( |
assemblyRef
assemblySecurity
Exception Type | Condition |
---|---|
ArgumentNullException | assemblyRef is null. |
FileNotFoundException | assemblyRef is not found. |
BadImageFormatException | assemblyFile is not a valid assembly. |
FileLoadException | An assembly or module was loaded twice with two different evidences. |
The assembly is loaded into the domain of the caller.
The Load methods use the default load context, which records the assembly name and assembly instance information for the set of assemblies that is the transitive closure of the assemblies referenced by a managed application. The default load context applies to assemblies that are loaded with a Load method and that use a fully qualified assembly reference.
rawAssembly
rawSymbolStore
Exception Type | Condition |
---|---|
ArgumentNullException | rawAssembly is null. |
BadImageFormatException | assemblyFile is not a valid assembly. |
The Load methods use the default load context, which records the assembly name and assembly instance information for the set of assemblies that is the transitive closure of the assemblies referenced by a managed application. The default load context applies to assemblies that are loaded with a Load method and that use a fully qualified assembly reference.
assemblyString
assemblySecurity
Exception Type | Condition |
---|---|
ArgumentNullException | assemblyString is null. |
FileNotFoundException | assemblyString is not found. |
BadImageFormatException | assemblyFile is not a valid assembly. |
FileLoadException | An assembly or module was loaded twice with two different evidences. |
The assembly is loaded into the domain of the caller.
The Load methods use the default load context, which records the assembly name and assembly instance information for the set of assemblies that is the transitive closure of the assemblies referenced by a managed application. The default load context applies to assemblies that are loaded with a Load method and that use a fully qualified assembly reference.
Reflecting on Managed Extensions for C++ executable files might throw a BadImageFormatException. This is most likely caused by C++ compiler stripping the relocation addresses or the .Reloc section from your executable file. To preserve the .reloc address for your C++ executable file, specify /fixed:no when you are linking.
public static Assembly Load( |
rawAssembly
rawSymbolStore
securityEvidence
Exception Type | Condition |
---|---|
ArgumentNullException | rawAssembly is null. |
BadImageFormatException | assemblyFile is not a valid assembly. |
FileLoadException | An assembly or module was loaded twice with two different evidences. |
SecurityException | The caller does not have the required permission. |
The Load methods use the default load context, which records the assembly name and assembly instance information for the set of assemblies that is the transitive closure of the assemblies referenced by a managed application. The default load context applies to assemblies that are loaded with a Load method and that use a fully qualified assembly reference.
assemblyFile
Exception Type | Condition |
---|---|
ArgumentNullException | assemblyFile is null. |
FileNotFoundException | assemblyFile is not found, or the module you are trying to load does not specify a filename extension. |
BadImageFormatException | assemblyFile is not a valid assembly. |
SecurityException | A codebase that does not start with "file://" was specified without the required WebPermission. |
FileLoadException | An assembly or module was loaded twice with two different evidences, or the assembly name is longer than MAX_PATH characters. |
assemblyFile is relative to the current directory, and the assembly is loaded into the domain of the caller.
The LoadFrom methods use a load context that records the assembly name and the assembly instance information for the set of assemblies that is the transitive closure of the assemblies loaded by the application using LoadFrom. The LoadFrom load context applies to assemblies that are loaded using their locations.
Assembly SampleAssembly; SampleAssembly = Assembly.LoadFrom("c:\\Sample.Assembly.dll"); // Obtain a reference to a method known to exist in assembly. MethodInfo Method = SampleAssembly.GetTypes()[0].GetMethod("Method1"); // Obtain a reference to the parameters collection of the MethodInfo instance. ParameterInfo[] Params = Method.GetParameters(); // Display information about method parameters. // Param = sParam1 // Type = System.String // Position = 0 // Optional=False foreach (ParameterInfo Param in Params){ Console.WriteLine("Param=" + Param.Name.ToString()); Console.WriteLine(" Type=" + Param.ParameterType.ToString()); Console.WriteLine(" Position=" + Param.Position.ToString()); Console.WriteLine(" Optional=" + Param.IsOptional.ToString()); }
assemblyFile
securityEvidence
Exception Type | Condition |
---|---|
ArgumentNullException | assemblyFile is null. |
FileNotFoundException | assemblyFile is not found, or the module you are trying to load does not specify a filename extension. |
BadImageFormatException | assemblyFile is not a valid assembly. |
SecurityException | A codebase that does not start with "file://" was specified without the required WebPermission. |
FileLoadException | An assembly or module was loaded twice with two different evidences, or the assembly name is longer than MAX_PATH characters. |
The assemblyFile parameter must refer to a URI without escape characters. This method supplies escape characters for all invalid characters in the URI.
assemblyFile is relative to the current directory, and the assembly is loaded into the domain of the caller.
The LoadFrom methods use a load context that records the assembly name and the assembly instance information for the set of assemblies that is the transitive closure of the assemblies loaded by the application using LoadFrom. The LoadFrom load context applies to assemblies that are loaded using their locations.
moduleName
rawModule
Exception Type | Condition |
---|---|
ArgumentNullException | moduleName or rawModule is null. |
ArgumentException | moduleName does not match a File entry in this assembly's manifest. |
BadImageFormatException | rawModule is not a valid module. |
SecurityException | The caller does not have the required permission. |
moduleName
rawModule
rawSymbolStore
Exception Type | Condition |
---|---|
ArgumentNullException | moduleName or rawModule is null. |
ArgumentException | moduleName does not match a File entry in this assembly's manifest. |
BadImageFormatException | rawModule is not a valid module. |
SecurityException | The caller does not have the required permission. |
partialName
Exception Type | Condition |
---|---|
ArgumentNullException | partialName is null. |
FileNotFoundException | partialName is not found. |
public static Assembly LoadWithPartialName( |
partialName
securityEvidence
Exception Type | Condition |
---|---|
ArgumentNullException | partialName is null. |
FileNotFoundException | partialName is not found. |
FileLoadException | An assembly or module was loaded twice with two different evidences. |
SecurityException | The caller does not have the required permission. |
Applications that load assemblies with this method will be impacted by upgrades of those assemblies. Therefore, do not use this method unless necessary, and even then, consider redesigning the application to use Assembly.Load or Assembly.LoadFrom.
protected object MemberwiseClone(); |
public override string ToString(); |
public event ModuleResolveEventHandler ModuleResolve;
|