Share via


DevicePlatform 結構

定義

代表應用程式執行所在的裝置平臺。

public value class DevicePlatform : IEquatable<Microsoft::Maui::Devices::DevicePlatform>
public readonly struct DevicePlatform : IEquatable<Microsoft.Maui.Devices.DevicePlatform>
type DevicePlatform = struct
Public Structure DevicePlatform
Implements IEquatable(Of DevicePlatform)
繼承
DevicePlatform
實作

屬性

Android

取得 的實例 DevicePlatform ,表示Android。

iOS

取得的實例 DevicePlatform ,表示 iOS。

MacCatalyst

取得 的 DevicePlatform 實例,表示 Mac Catalyst。

macOS

取得 的實例 DevicePlatform ,表示macOS。

Tizen

取得 的 DevicePlatform 實例,表示 Samsung Tizen。

tvOS

取得 的 DevicePlatform 實例,表示 Apple tvOS。

Unknown

取得的 DevicePlatform 實例,表示未知的平臺。 當目前的平臺未知時,就會使用此功能。

UWP
已淘汰.

取得 的實例 DevicePlatform ,表示 UWP。

watchOS

取得 的 DevicePlatform 實例,表示 Apple watchOS。

WinUI

取得 的實例 DevicePlatform ,表示 WinUI。

方法

Create(String)

建立新的裝置平台實例。 這可用來定義您的自定義平臺。

Equals(DevicePlatform)

比較基礎 DevicePlatform 實例。

Equals(Object)

檢查平臺是否相等。

GetHashCode()

取得這個平台實例的哈希碼。

ToString()

傳回裝置平臺目前值的字串表示。

運算子

Equality(DevicePlatform, DevicePlatform)

等於的相等運算符。

Inequality(DevicePlatform, DevicePlatform)

不等比較運算符。

適用於