Bewerken

Share via


AssemblyNameProxy.GetAssemblyName(String) Method

Definition

Gets the AssemblyName for a given file.

public:
 System::Reflection::AssemblyName ^ GetAssemblyName(System::String ^ assemblyFile);
public System.Reflection.AssemblyName GetAssemblyName (string assemblyFile);
member this.GetAssemblyName : string -> System.Reflection.AssemblyName
Public Function GetAssemblyName (assemblyFile As String) As AssemblyName

Parameters

assemblyFile
String

The assembly file for which to get the AssemblyName.

Returns

An AssemblyName object representing the given file.

Exceptions

assemblyFile is null.

assemblyFile is empty.

assemblyFile is not found.

The caller does not have the required permission.

assemblyFile is not a valid assembly.

Remarks

This will only work if the file contains an assembly manifest. This method causes the file to be opened and closed.

Applies to