For loop with a non-integer increment in VB.NET
Posted
by Dan Tao
on Stack Overflow
See other posts from Stack Overflow
or by Dan Tao
Published on 2010-05-28T13:24:08Z
Indexed on
2010/05/28
13:32 UTC
Read the original article
Hit count: 270
Can a VB.NET For
loop be constructed that mimics this C# code?
TimeSpan oneDay = TimeSpan.FromDays(1.0);
for (DateTime d = startDate; d < endDate; d += oneDay) {
// some code
}
Obviously you could do it without a For
loop (i.e., with a While
); I'm just curious if there's a certain syntax to construct a VB.NET For
loop with a non-integer increment that I'm not aware of.
© Stack Overflow or respective owner