ApiInformation.IsTypePresent(String) Metode

Definisi

Mengembalikan true atau false untuk menunjukkan apakah ada tipe tertentu.

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

Parameter

typeName
String

Platform::String

winrt::hstring

Nama tipe yang memenuhi syarat namespace.

Mengembalikan

Boolean

bool

True jika jenis yang ditentukan ada; jika tidak, salah.

Contoh

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");
}

Berlaku untuk