語言

SupportedSimulatorAttribute 類別

定義

表示該 API 支援特定平台。 若指定版本,API 將從指定的作業系統版本開始使用。 可套用多種屬性來表示支援多個作業系統。

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Property, AllowMultiple=true)]
public sealed class SupportedSimulatorAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Property, AllowMultiple=true)>]
type SupportedSimulatorAttribute = class
    inherit Attribute
繼承
SupportedSimulatorAttribute
屬性

備註

與標準可用性屬性(如 SupportedOSPlatformAttribute 屬性)不同,某些平台存在此屬性並不代表其他平台有意義。

若 API 上沒有 SupportedSimulatorAttribute or UnsupportedSimulatorAttribute 屬性,則假設該 API 在模擬器中可用。

如果應用程式被刪除,這個屬性也會被刪除。

建構函式

名稱 Description
SupportedSimulatorAttribute(String)

初始化一個新 SupportedSimulatorAttribute 屬性。

屬性

名稱 Description
PlatformName

月台名稱。

適用於