ApiInformation.IsWriteablePropertyPresent(String, String) Methode

Definition

Gibt true oder false zurück, um anzugeben, ob eine angegebene schreibbare Eigenschaft für einen angegebenen Typ vorhanden ist.

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

Parameter

typeName
String

Platform::String

winrt::hstring

Der namespacequalifizierte Name des Typs.

propertyName
String

Platform::String

winrt::hstring

Der Name der Eigenschaft.

Gibt zurück

Boolean

bool

True , wenn die angegebene Eigenschaft für den Typ vorhanden ist; Andernfalls false.

Beispiele

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

Gilt für: