The small white for help
CodePudding user response:
For the first time in the button click access time save, when click the second time, get the latest time, compare!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: