public string GetCurrentTime()
{
DateTime now = DateTime.Now;
string time = now.ToString(“HH:mm:ss”);
return time;
}
获取 24小时制时间
![](https://img-home.csdnimg.cn/images/20240711042549.png)
public string GetCurrentTime()
{
DateTime now = DateTime.Now;
string time = now.ToString(“HH:mm:ss”);
return time;
}