PingReply.RoundtripTime Property

 

Gets the number of milliseconds taken to send an Internet Control Message Protocol (ICMP) echo request and receive the corresponding ICMP echo reply message.

Namespace:   System.Net.NetworkInformation
Assembly:  System (in System.dll)

Public ReadOnly Property RoundtripTime As Long

Property Value

Type: System.Int64

An Int64 that specifies the round trip time, in milliseconds.

If the Echo request fails, the RoundtripTime time is reported as 0, which is also a valid value when the request succeeds. You must check the Status to determine whether the value returned by this property should be ignored.

The following code example sends an ICMP echo request synchronously and displays the size of the buffer returned by this property.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: