IPAddress.ScopeId プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > IPAddress.ScopeId プロパティの意味・解説 

IPAddress.ScopeId プロパティ

IPv6 アドレススコープ識別子取得または設定します

名前空間: System.Net
アセンブリ: System (system.dll 内)
構文構文

例外例外
例外種類条件

SocketException

AddressFamily = InterNetwork

ArgumentOutOfRangeException

scopeId < 0

または

  • scopeId > 0x00000000FFFFFFFF

解説解説
使用例使用例
' 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()));
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

IPAddress.ScopeId プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



IPAddress.ScopeId プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS