


窗体加载时就获取系统时间赋值给 label1.Text
运行后如下图:private void Form1_Load(object sender, EventArgs e)
{
label1.Text = "当前系统时间:" + DateTime.Now.ToString();//获取系统时间
}



亲爱的:若该文章解决了您的问题,可否收藏+评论+分享呢?
运行后如下图:private void Form1_Load(object sender, EventArgs e)
{
label1.Text = "当前系统时间:" + DateTime.Now.ToString();//获取系统时间
}
文章评论 本文章有个评论