C# Ping(或 PingReply)是否采用平均 RTT?

Does C# Ping (or PingReply) take the average RTT?

我一直在寻找有关 C# PingReply 中返回的往返时间是多个结果的平均值还是一个结果的文档,但我似乎找不到答案。有谁知道这个,或者谁能在文档中找到我遗漏的东西?

这是你得到的往返时间。您可以参考 MSDN:

The Ping class attempts to send an Internet Control Message Protocol (ICMP) echo request to a remote computer and receive information back from the computer via an ICMP echo reply message. The Ping class uses instances of the PingReply class to return information about the operation, such as its status and the time taken to send the request and receive the reply.

The Send methods return instances of the PingReply class directly. The SendAsync methods return a PingReply in the PingCompletedEventHandler method's PingCompletedEventArgs parameter. The PingReply is accessed through the Reply property.