Click or drag to resize
AssemblyNameGetAssemblyName Method
Gets the AssemblyName for a given file.

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static AssemblyName GetAssemblyName(
	string assemblyFile
)

Parameters

assemblyFile
Type: SystemString
The path for the assembly whose AssemblyName is to be returned.

Return Value

Type: AssemblyName
An object that represents the given assembly file.
Exceptions
ExceptionCondition
ArgumentNullExceptionassemblyFile is null.
ArgumentExceptionassemblyFile is invalid, such as an assembly with an invalid culture.
FileNotFoundExceptionassemblyFile is not found.
SecurityExceptionThe caller does not have path discovery permission.
BadImageFormatExceptionassemblyFile is not a valid assembly.
FileLoadExceptionAn assembly or module was loaded twice with two different sets of evidence.
See Also