Marshal.GenerateProgIdForType(Type) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會回傳指定類型的程式識別碼(ProgID)。
public:
static System::String ^ GenerateProgIdForType(Type ^ type);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Built-in COM support is not trim compatible", Url="https://aka.ms/dotnet-illink/com")]
public static 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);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Built-in COM support is not trim compatible", Url="https://aka.ms/dotnet-illink/com")>]
static member GenerateProgIdForType : Type -> string
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。