ApiInformation.IsReadOnlyPropertyPresent(String, 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 read-only property is present for a specified type.
public:
static bool IsReadOnlyPropertyPresent(Platform::String ^ typeName, Platform::String ^ propertyName);
static bool IsReadOnlyPropertyPresent(winrt::hstring const& typeName, winrt::hstring const& propertyName);
public static bool IsReadOnlyPropertyPresent(string typeName, string propertyName);
function isReadOnlyPropertyPresent(typeName, propertyName)
Public Shared Function IsReadOnlyPropertyPresent (typeName As String, propertyName As String) As Boolean
Parameters
- typeName
-
String
Platform::String
winrt::hstring
The namespace-qualified name of the type.
- propertyName
-
String
Platform::String
winrt::hstring
The name of the property.
Returns
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");
}
Applies to
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin