Método Marshal.GenerateProgIdForType (Type)
Dica
The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.
Retorna um ProgID (identificador programático) para o tipo especificado.
Namespace: System.Runtime.InteropServices
Assembly: mscorlib (em mscorlib.dll)
Sintaxe
[SecurityCriticalAttribute]
public static string GenerateProgIdForType(
Type type
)
public:
[SecurityCriticalAttribute]
static String^ GenerateProgIdForType(
Type^ type
)
[<SecurityCriticalAttribute>]
static member GenerateProgIdForType :
type:Type -> string
<SecurityCriticalAttribute>
Public Shared Function GenerateProgIdForType (
type As Type
) As String
Parâmetros
type
Type: System.TypeO tipo para o qual obter um ProgID.
Valor Retornado
Type: System.String
O ProgID do tipo especificado.
Exceções
Exception | Condition |
---|---|
ArgumentException | O parâmetro type não é uma classe que pode ser criada por COM. A classe deve ser pública, ter um construtor padrão público e ser visível pelo COM. |
ArgumentNullException | O parâmetro type é null. |
Comentários
Se o tipo tem um ProgID nos metadados, o ProgID retornado. Caso contrário, um ProgID é gerado com base no nome totalmente qualificado do tipo.
Segurança
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
Informações de Versão
.NET Framework
Disponível desde 1.1
Confira Também
Classe Marshal
Namespace System.Runtime.InteropServices
Retornar ao início