Marshal.GenerateProgIdForType(Type) Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Returnerar en programmatisk identifierare (ProgID) för den angivna typen.
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
Parametrar
- type
- Type
Den typ som du vill hämta ett ProgID för.
Returer
ProgID för den angivna typen.
- Attribut
Undantag
Parametern type är inte en klass som kan skapas av COM. Klassen måste vara offentlig, ha en offentlig parameterlös konstruktor och vara COM-synlig.
Parametern type är null.
Kommentarer
Om typen har ett ProgID i metadata returneras progID. Annars genereras ett ProgID baserat på det fullständigt kvalificerade namnet på typen.