VB.NET アプリケーションに 2 つの DateTime 値があります。
開始日を DateTime として暗くする endDate を DateTime として暗くする
今、私は次のように startDate と endDate の間の毎日のループを作りたいです:
For Each day As Integer In ??????????
次
誰かがアイデアを持っていますか?
C# :
for(DateTime CurrentDate = StartDate;
CurrentDate < EndDate;
CurrentDate = CurrentDate.AddDays(1))
{
}
VB.NET :
Dim CurrentDate As DateTime = StartDate
While CurrentDate < EndDate
CurrentDate = CurrentDate.AddDays(1)
End While
Dim currentDate As Date = startDate
While currentDate <= endDate
'do something with this date...'
currentDate = currentDate.AddDays(1)
End While