Marshal.GenerateProgIdForType(Type) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- type
- Type
The type to get a ProgID for.
The ProgID of the specified type.
- Attributes
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
.
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.
Product | Versions |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: