Home > Net >  C # to get twice the time interval by clicking on the button how to write?
C # to get twice the time interval by clicking on the button how to write?

Time:10-01

With second unit
The small white for help

CodePudding user response:

 
DateTime t1, t2;
Private void button1_Click (object sender, EventArgs e)
{

T2=DateTime. Now;
If (t1!!!=a DateTime. MinValue)
{
MessageBox. Show ((t2 - t1). The ToString ());
}
The else
{
MessageBox. Show (" for the first time, click on ");
}
T1=t2;
}

CodePudding user response:

The post has been back to you
  •  Tags:  
  • C#
  • Related