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

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

PingCompletedEventArgs.Reply プロパティ

メモ : このプロパティは、.NET Framework version 2.0 で新しく追加されたものです。

ICMP (インターネット コントロール メッセージ プロトコル) エコー要求メッセージの送信と、対応する ICMP エコー応答メッセージの受信を行う処理について記述したデータが格納されているオブジェクトを取得します。

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

Dim instance As PingCompletedEventArgs
Dim value As PingReply

value = instance.Reply
public PingReply Reply { get; }
public:
property PingReply^ Reply {
    PingReply^ get ();
}
/** @property */
public PingReply get_Reply ()

プロパティ値
ICMP エコー要求の結果を記述した PingReply オブジェクト。

解説解説
使用例使用例

PingCompleted イベントへの応答に使用するメソッドを実装したコード例を次に示します。詳細については、PingCompletedEventArgs クラスの概要を参照してください。

public static void PingCompletedCallback
 (object sender, PingCompletedEventArgs e)
{
    // If the operation was canceled, display a message to the user.
    if (e.Cancelled)
    {
        Console.WriteLine ("Ping canceled.");

        // Let the main thread resume. 
        // UserToken is the AutoResetEvent object that the main thread
 
        // is waiting for.
        ((AutoResetEvent)e.UserState).Set ();
    }

    // If an error occurred, display the exception to the user.
    if (e.Error != null)
    {
        Console.WriteLine ("Ping failed:");
        Console.WriteLine (e.Error.ToString ());

        // Let the main thread resume. 
        ((AutoResetEvent)e.UserState).Set();
    }

    PingReply reply = e.Reply;

    DisplayReply (reply);

    // Let the main thread resume.
    ((AutoResetEvent)e.UserState).Set();
}

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PingCompletedEventArgs クラス
PingCompletedEventArgs メンバ
System.Net.NetworkInformation 名前空間



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

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

   

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



PingCompletedEventArgs.Reply プロパティのページの著作権

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

©2026 GRAS Group, Inc.RSS