IPAddress.AddressFamily プロパティとは何? わかりやすく解説 Weblio辞書 (original) (raw)
名前空間: System.Net
アセンブリ: System (system.dll 内)
構文
Public ReadOnly Property AddressFamily As AddressFamily
Dim instance As IPAddress Dim value As AddressFamily
value = instance.AddressFamily
public AddressFamily AddressFamily { get; }
public: property AddressFamily AddressFamily { AddressFamily get (); }
/** @property */ public AddressFamily get_AddressFamily ()
public function get AddressFamily () : AddressFamily
プロパティ値
IPv4 の場合は InterNetwork、IPv6 の場合は InterNetworkV6 を返します。
IPAddress クラスのトピックの例を参照してください。
' Display the type of address family supported by the server. If the ' server is IPv6-enabled this value is: InternNetworkV6. If the server ' is also IPv4-enabled there will be an additional value of InterNetwork. Console.WriteLine(("AddressFamily: " + curAdd.AddressFamily.ToString()))
' Display the ScopeId property in case of IPV6 addresses. If curAdd.AddressFamily.ToString() = ProtocolFamily.InterNetworkV6.ToString() Then Console.WriteLine(("Scope Id: " + curAdd.ScopeId.ToString())) End If
// Display the type of address family supported by the server. If the // server is IPv6-enabled this value is: InternNetworkV6. If the server // is also IPv4-enabled there will be an additional value of InterNetwork. Console.WriteLine("AddressFamily: " + curAdd.AddressFamily.ToString());
// Display the ScopeId property in case of IPV6 addresses. if(curAdd.AddressFamily.ToString() == ProtocolFamily.InterNetworkV6.ToString()) Console.WriteLine("Scope Id: " + curAdd.ScopeId.ToString());
// Display the type of address family supported by the server. // If the server is IPv6-enabled this value is:InternNetworkV6. // If the server is also IPv4-enabled there will be an // additional value of InterNetwork. Console.WriteLine(("AddressFamily: " + curAdd.get_AddressFamily().ToString()));
// Display the ScopeId property in case of IPV6 addresses. if (curAdd.get_AddressFamily().ToString().equals( ProtocolFamily.InterNetworkV6.ToString())) { Console.WriteLine(("Scope Id: " +(new Long(curAdd.get_ScopeId())).ToString())); }
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
.NET Framework
サポート対象 : 2.0、1.1、1.0
.NET Compact Framework
サポート対象 : 2.0