NetworkInterface.GetPhysicalAddress メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > NetworkInterface.GetPhysicalAddress メソッドの意味・解説 

NetworkInterface.GetPhysicalAddress メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

このアダプタメディア アクセス制御 (MAC: Media Access Control) アドレス返します

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

解説解説
使用例使用例

ローカル コンピュータすべてのインターフェイス物理アドレス表示するコード例次に示します

Public Shared Sub DisplayTypeAndAddress()
 
    Dim computerProperties As IPGlobalProperties
 = IPGlobalProperties.GetIPGlobalProperties()
    Dim nics As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
    Console.WriteLine("Interface information for {0}.{1}     ",
 computerProperties.HostName, computerProperties.DomainName)
    Dim adapter As NetworkInterface
    For Each adapter In
  nics
        Dim properties As IPInterfaceProperties
 = adapter.GetIPProperties()
        Console.WriteLine(adapter.Description)
        Console.WriteLine(String.Empty.PadLeft(adapter.Description.Length,
 "="c))
        Console.WriteLine("  Interface type ..........................
 : {0}", adapter.NetworkInterfaceType)
        Console.WriteLine("  Physical Address ........................
 : {0}", adapter.GetPhysicalAddress().ToString())
        Console.WriteLine("  Is receive only..........................
 : {0}", adapter.IsReceiveOnly)
        Console.WriteLine("  Multicast................................
 : {0}", adapter.SupportsMulticast)
    Next adapter

End Sub 'DisplayTypeAndAddress

 public static void DisplayTypeAndAddress()
{
    IPGlobalProperties computerProperties = IPGlobalProperties.GetIPGlobalProperties();
    NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
    Console.WriteLine("Interface information for {0}.{1}
     ",
            computerProperties.HostName, computerProperties.DomainName);
    foreach (NetworkInterface adapter in nics)
    {
        IPInterfaceProperties properties = adapter.GetIPProperties();
        Console.WriteLine(adapter.Description);
        Console.WriteLine(String.Empty.PadLeft(adapter.Description.Length,'='));
        Console.WriteLine("  Interface type .......................... : {0}",
 adapter.NetworkInterfaceType);
        Console.WriteLine("  Physical Address ........................ : {0}",
 
                   adapter.GetPhysicalAddress().ToString());
        Console.WriteLine("  Is receive only.......................... : {0}",
 adapter.IsReceiveOnly);
        Console.WriteLine("  Multicast................................ : {0}",
 adapter.SupportsMulticast);
      }
   }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からNetworkInterface.GetPhysicalAddress メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からNetworkInterface.GetPhysicalAddress メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からNetworkInterface.GetPhysicalAddress メソッドを検索

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

辞書ショートカット

すべての辞書の索引

「NetworkInterface.GetPhysicalAddress メソッド」の関連用語

NetworkInterface.GetPhysicalAddress メソッドのお隣キーワード
検索ランキング

   

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



NetworkInterface.GetPhysicalAddress メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS