c# - StopWatch to Show Counter of Elapsed Time? -


i have textbox on windows form wanting show elapsed time procedure has taken, not seeing time counting in textbox. below code

public partial class form1 : system.windows.forms.form {   private stopwatch watch = new stopwatch()l    private void btn_rashadsl()   {     watch.start();     //lots of code here typically takes around 15 - 20 minutes complete   }   private void timer_tick(object sender, eventargs e)   {     textbox1.text = watch.elapsed.seconds.tostring();   } } 

given code have posted i'd problem @ no point have set timer call timer_tick method.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -