Marshal.GenerateProgIdForType(Type) Method
Definition
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
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈