private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
this->label3->Text = stopWatch.Elapsed.ToString();}
I need help for changing the format of my stopWatch, how can i put a format like "HH:mm:ss" please ?
because doing this just show the default format that shows too much numbers
>Solution :
Stopwatch.Elapsed is of type TimeSpan.
This type supports various formats when converting to string.
You can see all the info here: Standard TimeSpan format strings, Custom TimeSpan format strings.
In your case I think the following custom format string will work:
System::String ^ text = stopWatch->Elapsed.ToString("hh\\:mm\\:ss");
this->label3->Text = text;