다음을 통해 공유


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인 경우). 액세스가 차단되면 이 메서드는 빈 문자열을 반환합니다.

이 메서드는 예외를 throw하지 않습니다.

적용 대상

추가 정보