IPGlobalProperties.DomainName 속성

정의

로컬 컴퓨터가 등록되어 있는 도메인을 가져옵니다.

public:
 abstract property System::String ^ DomainName { System::String ^ get(); };
public abstract string DomainName { get; }
member this.DomainName : string
Public MustOverride ReadOnly Property DomainName As String

속성 값

컴퓨터의 도메인 이름이 들어 있는 String 인스턴스입니다. 컴퓨터가 도메인에 속하지 않는 경우에는 Empty를 반환합니다.

예외

Win32 함수 호출이 실패한 경우.

예제

다음 코드 예제에서는 로컬 컴퓨터에 대 한 네트워크 정보를 표시 합니다.

IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
Console::WriteLine( "Computer name: {0}", properties->HostName );
Console::WriteLine( "Domain name:   {0}", properties->DomainName );
Console::WriteLine( "Node type:     {0:f}", properties->NodeType );
Console::WriteLine( "DHCP scope:    {0}", properties->DhcpScopeName );
Console::WriteLine( "WINS proxy?    {0}", properties->IsWinsProxy );
IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
Console.WriteLine("Computer name: {0}", properties.HostName);
Console.WriteLine("Domain name:   {0}", properties.DomainName);
Console.WriteLine("Node type:     {0:f}", properties.NodeType);
Console.WriteLine("DHCP scope:    {0}", properties.DhcpScopeName);
Console.WriteLine("WINS proxy?    {0}", properties.IsWinsProxy);

적용 대상