Marshal.GenerateProgIdForType(Type) Metoda

Definice

Vrátí programový identifikátor (ProgID) pro zadaný typ.

public:
 static System::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);
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, pro který chcete získat ProgID.

Návraty

Identifikátor ProgID zadaného typu.

Atributy

Výjimky

Parametr type není třída, kterou lze vytvořit pomocí modelu COM. Třída musí být veřejná, musí mít veřejný konstruktor bez parametrů a musí být viditelná objektem COM.

Parametr type je null.

Poznámky

Pokud má typ v metadatech identifikátor ProgID, vrátí se tento identifikátor ProgID. V opačném případě se progID vygeneruje na základě plně kvalifikovaného názvu typu.

Platí pro