ApiInformation.IsTypePresent(String) Método

Definição

Retorna true ou false para indicar se um tipo especificado está presente.

public:
 static bool IsTypePresent(Platform::String ^ typeName);
 static bool IsTypePresent(winrt::hstring const& typeName);
public static bool IsTypePresent(string typeName);
function isTypePresent(typeName)
Public Shared Function IsTypePresent (typeName As String) As Boolean

Parâmetros

typeName
String

Platform::String

winrt::hstring

O nome qualificado do namespace do tipo.

Retornos

Boolean

bool

True se o tipo especificado estiver presente; caso contrário, false.

Exemplos

if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.System.AppDiagnosticInfo"))
{
    Debug.WriteLine("Windows.System.AppDiagnosticInfo type was found");
}
else
{
    Debug.WriteLine("Windows.System.AppDiagnosticInfo type was NOT found");
}

Aplica-se a