IP アドレスを提供し、ネットワーク インターフェイスを使用しないことを示します。このフィールドは読み取り専用です。
Public Shared ReadOnly None As IPAddress
[C#]
public static readonly IPAddress None;
[C++]
public: static IPAddress* None;
[JScript]
public static var None : IPAddress;
解説
Socket.Bind メソッドは、 None フィールドを使用して、 Socket がクライアントによるネットワーク利用を待機する必要がないことを示します。 None フィールドは、ピリオド区切りの 10 進表記で 255.255.255.255 と等しくなります。
使用例
[Visual Basic, C#, C++] None プロパティを使用して、ネットワーク インターフェイスを使用しないことを示す例を次に示します。
Public Shared Sub Main()
' Gets the IP address indicating that no network interface should be used
' and converts it to a string.
Dim address As String = IPAddress.None.ToString()
Console.WriteLine(("IP address : " + address))
End Sub 'Main
[C#]
public static void Main()
{
// Gets the IP address indicating that no network interface should be used
// and converts it to a string.
string address = IPAddress.None.ToString();
Console.WriteLine("IP address : " + address);
}
[C++]
int main() {
// Gets the IP address indicating that no network interface should be used
// and converts it to a String*.
String* address = IPAddress::None->ToString();
Console::WriteLine(S"IP address : {0}", address);
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET, Common Language Infrastructure (CLI) Standard