ApiInformation.IsWriteablePropertyPresent(String, String) メソッド

定義

指定した型に対して、指定した書き込み可能なプロパティが存在するかどうかを示す true または false を返します。

public:
 static bool IsWriteablePropertyPresent(Platform::String ^ typeName, Platform::String ^ propertyName);
 static bool IsWriteablePropertyPresent(winrt::hstring const& typeName, winrt::hstring const& propertyName);
public static bool IsWriteablePropertyPresent(string typeName, string propertyName);
function isWriteablePropertyPresent(typeName, propertyName)
Public Shared Function IsWriteablePropertyPresent (typeName As String, propertyName As String) As Boolean

パラメーター

typeName
String

Platform::String

winrt::hstring

型の名前空間修飾名。

propertyName
String

Platform::String

winrt::hstring

プロパティの名前。

戻り値

Boolean

bool

True の 場合、指定したプロパティが型に対して存在します。それ以外の場合は false

if (Windows.Foundation.Metadata.ApiInformation.IsWriteablePropertyPresent("Windows.Devices.Sensors.Accelerometer", "ReportInterval"))
{
    Debug.WriteLine("Windows.Devices.Sensors.Accelerometer.ReportInterval writeable property was found");
}
else
{
    Debug.WriteLine("Windows.Devices.Sensors.Accelerometer.ReportInterval writeable property was NOT found");
}

適用対象