ApiInformation.IsReadOnlyPropertyPresent(String, String) ApiInformation.IsReadOnlyPropertyPresent(String, String) ApiInformation.IsReadOnlyPropertyPresent(String, String) ApiInformation.IsReadOnlyPropertyPresent(String, String) ApiInformation.IsReadOnlyPropertyPresent(String, String) Method

Definition

Returns true or false to indicate whether a specified read-only property is present for a specified type.

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

Parameters

typeName
String String String

The namespace-qualified name of the type.

propertyName
String String String

The name of the property.

Returns

bool bool bool

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

Examples

if (Windows.Foundation.Metadata.ApiInformation.IsReadOnlyPropertyPresent("Windows.Devices.Sensors.Accelerometer", "ReadingType"))
{
    Debug.WriteLine("Windows.Devices.Sensors.Accelerometer.ReadingType read-only property was found");
}
else
{
    Debug.WriteLine("Windows.Devices.Sensors.Accelerometer.ReadingType read-only property was NOT found");
}