ApiInformation.IsWriteablePropertyPresent(String, String) Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mengembalikan true atau false untuk menunjukkan apakah properti yang dapat ditulis yang ditentukan ada untuk jenis tertentu.
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
Nama tipe yang memenuhi syarat namespace.
- propertyName
-
String
Platform::String
winrt::hstring
Nama properti.
Mengembalikan
bool
True jika properti yang ditentukan ada untuk jenis; jika tidak, salah.
Contoh
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");
}
Berlaku untuk
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk