Marshal.GenerateProgIdForType(Type) メソッド

定義

指定した型のプログラム ID (ProgID) を返します。

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

パラメーター

type
Type

ProgID を取得する対象の型。

戻り値

指定した型の ProgID。

属性

例外

type パラメーターは、COM で作成できるクラスではありません。 クラスはパブリックであり、パラメーターなしのパブリック コンストラクターがあり、COM 参照可能である必要があります。

type パラメーターが null です。

注釈

型にメタデータに ProgID がある場合、その ProgID が返されます。 それ以外の場合は、型の完全修飾名に基づいて ProgID が生成されます。

適用対象