User 類別

定義

代表使用者。

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

Windows 需求

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

屬性

AuthenticationStatus

取得使用者的驗證狀態。

NonRoamableId

取得使用者的不可漫遊識別碼。

Type

取得使用者類型。

方法

CheckUserAgeConsentGroupAsync(UserAgeConsentGroup)

擷取值,指出使用者是否屬於指定的使用者年齡同意群組。

CreateWatcher()

建立 UserWatcher ,它會列舉使用者,並在使用者集合變更或使用者驗證狀態變更時引發事件。

FindAllAsync()

以非同步方式尋找所有使用者。

FindAllAsync(UserType)

以非同步方式尋找指定類型的所有使用者。

FindAllAsync(UserType, UserAuthenticationStatus)

以非同步方式尋找指定類型和驗證狀態的所有使用者。

GetDefault()

取得物件,表示預設使用者帳戶。

GetFromId(String)

取得具有指定識別碼的使用者。

GetPictureAsync(UserPictureSize)

以非同步方式取得使用者的圖片。

GetPropertiesAsync(IVectorView<String>)

取得使用者的屬性。

GetPropertyAsync(String)

取得使用者的屬性。 使用 KnownUserProperties 類別來取得屬性名稱。

適用於

另請參閱