ערוך

שתף באמצעות


Marshal.GetTypeLibVersionForAssembly(Assembly, Int32, Int32) Method

Definition

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)

Parameters

inputAssembly
Assembly

A managed assembly.

majorVersion
Int32

The major version number.

minorVersion
Int32

The minor version number.

Attributes

Exceptions

inputAssembly is null.

Remarks

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.

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.

Applies to

See also