How I can set DispatcherTimer into the for loop.

Posted by Jitendra Jadav on Stack Overflow See other posts from Stack Overflow or by Jitendra Jadav
Published on 2010-12-28T06:34:32Z Indexed on 2010/12/28 10:54 UTC
Read the original article Hit count: 272

Filed under:
|

Hello guys,

I am using wpf DispatcherTimer and I want ot use it into the for loop how i can use it..

my code is here..

        DispatcherTimer timer = new DispatcherTimer();

        timer.Tick += (s, e) =>
        {
            for (i = 0; i < 10; i++)
            {
                obsValue.Add(new Entities(i));
                timer.Interval = TimeSpan.FromSeconds(30);
                timer.Start();
            }
        };

Thanks....

© Stack Overflow or respective owner

Related posts about wpf

Related posts about multithreading