IPInterfaceProperties.DnsSuffix Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Bu arabirimle ilişkili Etki Alanı Adı Sistemi (DNS) sonekini alır.
public:
abstract property System::String ^ DnsSuffix { System::String ^ get(); };
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract string DnsSuffix { get; }
public abstract string DnsSuffix { get; }
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
member this.DnsSuffix : string
member this.DnsSuffix : string
Public MustOverride ReadOnly Property DnsSuffix As String
Özellik Değeri
String Bu arabirimin DNS sonekini içeren veya Empty arabirim için DNS soneki yoksa.
- Öznitelikler
Örnekler
Aşağıdaki kod örneği DNS son ekini görüntüler.
public static void DisplayDnsConfiguration()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface adapter in adapters)
{
IPInterfaceProperties properties = adapter.GetIPProperties();
Console.WriteLine(adapter.Description);
Console.WriteLine(" DNS suffix .............................. : {0}",
properties.DnsSuffix);
Console.WriteLine(" DNS enabled ............................. : {0}",
properties.IsDnsEnabled);
Console.WriteLine(" Dynamically configured DNS .............. : {0}",
properties.IsDynamicDnsEnabled);
}
Console.WriteLine();
}
Public Shared Sub DisplayDnsConfiguration()
Dim adapters As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
Dim adapter As NetworkInterface
For Each adapter In adapters
Dim properties As IPInterfaceProperties = adapter.GetIPProperties()
Console.WriteLine(adapter.Description)
Console.WriteLine(" DNS suffix................................. :{0}", properties.DnsSuffix)
Console.WriteLine(" DNS enabled ............................. : {0}", properties.IsDnsEnabled)
Console.WriteLine(" Dynamically configured DNS .............. : {0}", properties.IsDynamicDnsEnabled)
Next adapter
End Sub
Açıklamalar
DNS soneki, BIR DNS adı sorgusuna uygun tam etki alanı adı (FQDN) elde etmek için nitelenmemiş bir ana bilgisayar adına eklenen etki alanı adını (örneğin, "contoso.com") tanımlar. Örneğin, yerel makinede "contoso.com" varsa ve nitelenmemiş "www" DnsSuffixana bilgisayar adını çözümlemesi gerekiyorsa, sorguya yönelik FQDN "www.contoso.com" olur.