I want to use the AddDays () method for a loop. But that will not work. despite being used in a loop, the value of the day does not increase. Then it transforms an infinite loop. For instance:
DateTime exDt = tempPermissionWarning[i].planned_start_date; for (DateTime dt = exDt; dt <= newTo; dt.AddDays(1)) { context = context + dt.ToShortDateString() + "รฆ" + tempPermissionWarning[i].resource_name) + ยจ"; }
How do I use the AddDays () method in a for loop
Thank you very much
Bilal source share