public void LoadAveragePingTime()
{
try
{
PingReply pingReply = pingClass.Send("logon.chronic-domination.com");
double AveragePing = (pingReply.RoundtripTime / 1.75);
label4.Text = (AveragePing.ToString() + "ms");
}
catch (Exception)
{
label4.Text = "Server is currently offline.";
}
}
目前,我的label4.Text get类似于:“ 187.371698712637”。
我需要显示类似“ 187.37”的内容
DOT之后只有两个职位。有人可以帮我吗?