Język

Marshal.GenerateProgIdForType(Type) Metoda

Definicja

Zwraca identyfikator programowy (ProgID) dla określonego typu.

public:
 static System::String ^ GenerateProgIdForType(Type ^ type);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Built-in COM support is not trim compatible", Url="https://aka.ms/dotnet-illink/com")]
public static string? GenerateProgIdForType(Type type);
public static string? GenerateProgIdForType(Type type);
public static string GenerateProgIdForType(Type type);
[System.Security.SecurityCritical]
public static string GenerateProgIdForType(Type type);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Built-in COM support is not trim compatible", Url="https://aka.ms/dotnet-illink/com")>]
static member GenerateProgIdForType : Type -> string
static member GenerateProgIdForType : Type -> string
[<System.Security.SecurityCritical>]
static member GenerateProgIdForType : Type -> string
Public Shared Function GenerateProgIdForType (type As Type) As String

Parametry

type
Type

Typ do pobrania identyfikatora ProgID.

Zwraca

Identyfikator ProgID określonego typu.

Atrybuty

Wyjątki

Parametr type nie jest klasą, którą można utworzyć za pomocą modelu COM. Klasa musi być publiczna, mieć publiczny konstruktor bez parametrów i być widoczny com.

Parametr type jest null.

Uwagi

Jeśli typ ma identyfikator ProgID w metadanych, zwracany jest ten identyfikator ProgID. W przeciwnym razie generowany jest identyfikator ProgID na podstawie w pełni kwalifikowanej nazwy typu.

Dotyczy