Marshal.GenerateProgIdForType(Type) Méthode

Définition

Retourne un identificateur programmatique (ProgID) pour le type spécifié.

public:
 static System::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

Paramètres

type
Type

Type pour lequel obtenir un ProgID.

Retours

ProgID du type spécifié.

Attributs

Exceptions

Le type paramètre n’est pas une classe qui peut être créée par COM. La classe doit être publique, avoir un constructeur sans paramètre public et être visible par COM.

Le type paramètre est null.

Remarques

Si le type a un ProgID dans les métadonnées, ce ProgID est retourné. Sinon, un ProgID est généré en fonction du nom complet du type.

S’applique à