Marshal.GenerateProgIdForType(Type) Method

Definition

Returns a programmatic identifier (ProgID) for the specified type.

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

Parameters

type
Type

The type to get a ProgID for.

Returns

The ProgID of the specified type.

Attributes

Exceptions

The type parameter is not a class that can be create by COM. The class must be public, have a public parameterless constructor, and be COM visible.

The type parameter is null.

Remarks

If the type has a ProgID in the metadata, that ProgID is returned. Otherwise, a ProgID is generated based on the fully qualified name of the type.

Applies to