Marshal.GetTypeLibVersionForAssembly(Assembly, Int32, Int32) Método

Definição

Recupera o número de versão de uma biblioteca de tipos que será exportada do assembly especificado.Retrieves the version number of a type library that will be exported from the specified assembly.

public:
 static void GetTypeLibVersionForAssembly(System::Reflection::Assembly ^ inputAssembly, [Runtime::InteropServices::Out] int % majorVersion, [Runtime::InteropServices::Out] int % minorVersion);
public static void GetTypeLibVersionForAssembly (System.Reflection.Assembly inputAssembly, out int majorVersion, out int minorVersion);
[System.Security.SecurityCritical]
public static void GetTypeLibVersionForAssembly (System.Reflection.Assembly inputAssembly, out int majorVersion, out int minorVersion);
static member GetTypeLibVersionForAssembly : System.Reflection.Assembly * int * int -> unit
[<System.Security.SecurityCritical>]
static member GetTypeLibVersionForAssembly : System.Reflection.Assembly * int * int -> unit
Public Shared Sub GetTypeLibVersionForAssembly (inputAssembly As Assembly, ByRef majorVersion As Integer, ByRef minorVersion As Integer)

Parâmetros

inputAssembly
Assembly

Um assembly gerenciado.A managed assembly.

majorVersion
Int32

O número da versão principal.The major version number.

minorVersion
Int32

O número da versão secundária.The minor version number.

Atributos

Exceções

inputAssembly é null.inputAssembly is null.

Comentários

Antes de exportar um assembly usando TypeLibExporterFlags com o CallerResolvedReferences valor, você pode usar esse método para recuperar a versão da biblioteca de tipos do assembly.Before exporting an assembly by using TypeLibExporterFlags with the CallerResolvedReferences value, you can use this method to retrieve the type library version from the assembly.

Se você não aplicar o TypeLibVersionAttribute atributo a um assembly exportado para controlar explicitamente o número de versão da biblioteca de tipos gerada, a biblioteca de tipos terá o mesmo número de versão que o assembly.If you do not apply the TypeLibVersionAttribute attribute to an exported assembly to explicitly control the version number of the generated type library, the type library will have the same version number as the assembly.

Aplica-se a

Confira também