ApiInformation.IsTypePresent(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns true or false to indicate whether a specified type is present.
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
Parameters
- typeName
-
String
Platform::String
winrt::hstring
The namespace-qualified name of the type.
Returns
Boolean
bool
True if the specified type is present; otherwise, false.
Examples
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");
}