UserInformation.GetDomainNameAsync メソッド

定義

ユーザーのドメイン名を取得します。

重要

UserInformation クラスは、Windows 10以降ではサポートされていません。 代わりに User クラスを使用してください。 UserInformation クラスのドキュメントの「解説」を参照してください。

public:
 static IAsyncOperation<Platform::String ^> ^ GetDomainNameAsync();
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<winrt::hstring> GetDomainNameAsync();
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("Use User instead of UserInformation. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.System.UserProfile.UserProfileContract")]
 static IAsyncOperation<winrt::hstring> GetDomainNameAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<string> GetDomainNameAsync();
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("Use User instead of UserInformation. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.System.UserProfile.UserProfileContract")]
public static IAsyncOperation<string> GetDomainNameAsync();
function getDomainNameAsync()
Public Shared Function GetDomainNameAsync () As IAsyncOperation(Of String)

戻り値

IAsyncOperation<String>

IAsyncOperation<Platform::String>

IAsyncOperation<winrt::hstring>

ユーザーのドメイン名を表す文字列。

属性

注釈

重要

UserInformation クラスは、Windows 10以降ではサポートされていません。 代わりに User クラスを使用してください。 UserInformation クラスのドキュメントの「解説」を参照してください。

ドメイン名へのアクセスは、プライバシー設定によってブロックできます (たとえば、 UserInformation.NameAccessAllowed プロパティが false の場合)。 アクセスがブロックされている場合、このメソッドは空の文字列を返します。

このメソッドは例外をスローしません。

適用対象

こちらもご覧ください