ApiInformation 類別

定義

可讓您偵測指定的成員、類型或 API 合約是否存在,以便安全地跨各種裝置進行 API 呼叫。

public ref class ApiInformation abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ApiInformation final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ApiInformation final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public static class ApiInformation
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public static class ApiInformation
Public Class ApiInformation
繼承
Object Platform::Object IInspectable ApiInformation
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.FoundationContract (已於 v1.0 引進)

方法

IsApiContractPresent(String, UInt16)

會傳回 true 或 false,指出是否有具有指定名稱和主要版本號碼的 API 合約。

IsApiContractPresent(String, UInt16, UInt16)

會傳回 true 或 false,指出是否有具有指定名稱和主要和次要版本號碼的 API 合約。

IsEnumNamedValuePresent(String, String)

會傳回 true 或 false,指出指定的具名常數是否存在指定的列舉。

IsEventPresent(String, String)

傳回 true 或 false,指出指定的類型是否存在指定的事件。

IsMethodPresent(String, String)

會傳回 true 或 false,指出指定的型別是否存在指定的方法。

IsMethodPresent(String, String, UInt32)

會傳回 true 或 false,指出指定的方法多載是否有指定類型的輸入參數數目。

IsPropertyPresent(String, String)

會傳回 true 或 false,指出指定的屬性 (可寫入或唯讀) 是否存在指定的類型。

IsReadOnlyPropertyPresent(String, String)

會傳回 true 或 false,指出指定的唯讀屬性是否存在於指定的型別。

IsTypePresent(String)

會傳回 true 或 false,指出指定的型別是否存在。

IsWriteablePropertyPresent(String, String)

會傳回 true 或 false,指出指定的可寫入屬性是否存在於指定的型別。

適用於

另請參閱