ApiInformation Class

Definition

Enables you to detect whether a specified member, type, or API contract is present so that you can safely make API calls across a variety of devices.

C#
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public static class ApiInformation
C#
[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
Inheritance
Object ApiInformation
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.FoundationContract (introduced in v1.0)

Methods

IsApiContractPresent(String, UInt16, UInt16)

Returns true or false to indicate whether the API contract with the specified name and major and minor version number is present.

IsApiContractPresent(String, UInt16)

Returns true or false to indicate whether the API contract with the specified name and major version number is present.

IsEnumNamedValuePresent(String, String)

Returns true or false to indicate whether a specified named constant is present for a specified enumeration.

IsEventPresent(String, String)

Returns true or false to indicate whether a specified event is present for a specified type.

IsMethodPresent(String, String, UInt32)

Returns true or false to indicate whether a specified method overload with the specified number of input parameters is present for a specified type.

IsMethodPresent(String, String)

Returns true or false to indicate whether a specified method is present for a specified type.

IsPropertyPresent(String, String)

Returns true or false to indicate whether a specified property (writeable or read-only) is present for a specified type.

IsReadOnlyPropertyPresent(String, String)

Returns true or false to indicate whether a specified read-only property is present for a specified type.

IsTypePresent(String)

Returns true or false to indicate whether a specified type is present.

IsWriteablePropertyPresent(String, String)

Returns true or false to indicate whether a specified writeable property is present for a specified type.

Applies to

Product Versions
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

See also