|
-
Sep 18th, 2007, 10:51 AM
#1
Thread Starter
Lively Member
TimeSpan
Hey Everyone,
I realize this is probably really simple. I can't figure why this isn't working.
Code:
TimeSpan endTime = new TimeSpan(0,1,0);
for (TimeSpan i = new TimeSpan(0,0,0); i < endTime; i.Add(new TimeSpan0,0,1)))
{
Invoker.Invoke(ProgressMade, this, new Progress(i.ToString()));
}
my Timespan i begins as {00:00:00} then gets incremented by 1 sec. However, nothing happens it only stays zero.
Thanks in advance,
-zd
-
Sep 18th, 2007, 10:59 AM
#2
Thread Starter
Lively Member
Re: TimeSpan
I figured it out. I must be retarded. However, if there is a better way to do this please post back.
Here is what I had
Code:
TimeSpan endTime = new TimeSpan(0,1,0);
for (TimeSpan i = new TimeSpan(0,0,0); i < endTime; i.Add(new TimeSpan0,0,1)))
{
Invoker.Invoke(ProgressMade, this, new Progress(i.ToString()));
}
Here is what I ended up doing
Code:
for (TimeSpan i = new TimeSpan(0,0,0); i < endTime; i = i.Add(new TimeSpan(0,0,1)))
{
Invoker.Invoke(ProgressMade, this, new Progress(i.ToString()));
}
Thanks,
-zd
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|