直接上代碼: int DayinWeek = 0; string week = DateTime.Today.DayOfWeek.ToString(); #region 獲取DayinWeek值 switch (week) { case "Monday": DayinWeek = 1; break; ...
直接上代碼:
int DayinWeek = 0; string week = DateTime.Today.DayOfWeek.ToString(); #region 獲取DayinWeek值 switch (week) { case "Monday": DayinWeek = 1; break; case "Tuesday": DayinWeek = 2; break; case "Wednesday": DayinWeek = 3; break; case "Thursday": DayinWeek = 4; break; case "Friday": DayinWeek = 5; break; case "Saturday": DayinWeek = 6; break; case "Sunday": DayinWeek = 7; break; }