For loop with a non-integer increment in VB.NET
Can a VB.NET For开发者_C百科 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.
No, it's not possible, the VB For loop does not support using a DateTime.
加载中,请稍侯......
精彩评论