AssemblyNameProxy::GetAssemblyName Method (String^)
.NET Framework (current version)
Gets the AssemblyName for a given file.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- assemblyFile
-
Type:
System::String^
The assembly file for which to get the AssemblyName.
Return Value
Type: System.Reflection::AssemblyName^An AssemblyName object representing the given file.
| Exception | Condition |
|---|---|
| ArgumentNullException | assemblyFile is null. |
| ArgumentException | assemblyFile is empty. |
| FileNotFoundException | assemblyFile is not found. |
| SecurityException | The caller does not have the required permission. |
| BadImageFormatException | assemblyFile is not a valid assembly. |
This will only work if the file contains an assembly manifest. This method causes the file to be opened and closed.
FileIOPermission
for access to information in the path. Associated enumeration: FileIOPermissionAccess::PathDiscovery
.NET Framework
Available since 1.1
Available since 1.1
Show: