ApiInformation.IsEventPresent(String, String) ApiInformation.IsEventPresent(String, String) ApiInformation.IsEventPresent(String, String) ApiInformation.IsEventPresent(String, String) ApiInformation.IsEventPresent(String, String) Method

Definition

Returns true or false to indicate whether a specified event is present for a specified type.

public : static Platform::Boolean IsEventPresent(Platform::String typeName, Platform::String eventName)
static bool IsEventPresent(winrt::hstring typeName, winrt::hstring eventName) const;
public static bool IsEventPresent(String typeName, String eventName)
Public Shared Function IsEventPresent(typeName As String, eventName As String) As bool
var bool = Windows.Foundation.Metadata.ApiInformation.isEventPresent(typeName, eventName);

Parameters

typeName
String String String

The namespace-qualified name of the type.

eventName
String String String

The name of the event.

Returns

bool bool bool

True if the specified event is present for the type; otherwise, false.

Examples

if (Windows.Foundation.Metadata.ApiInformation.IsEventPresent("Windows.Media.Core.AudioTrack", "OpenFailed"))
{
    Debug.WriteLine("Windows.Media.Core.AudioTrack.OpenFailed event found");
}
else
{
    Debug.WriteLine("Windows.Media.Core.AudioTrack.OpenFailed event NOT found");
}