DateTime now = DateTime.Now; DayOfWeek dayOfWeek = now.DayOfWeek; string d = string.Empty; switch (dayOfWeek) { case DayOfWeek.Friday: d = "星期一"; break; case DayOfWeek.Monday: d = "星期二"; break; case DayOfWeek.Saturday: d = "星期三"; break; case DayOfWeek.Sunday: d = "星期四"; break; case DayOfWeek.Thursday: d = "星期五"; break; case DayOfWeek.Tuesday: d = "星期六"; break; case DayOfWeek.Wednesday: d = "星期日"; break; default: break; } d就是你要的星期
DateTime now = DateTime.Now; DayOfWeek dayOfWeek = now.DayOfWeek; string d = string.Empty; switch (dayOfWeek) { case DayOfWeek.Friday: d = "星期一"; break; case DayOfWeek.Monday: d = "星期二"; break; case DayOfWeek.Saturday: d = "星期三"; break; case DayOfWeek.Sunday: d = "星期四"; break; case DayOfWeek.Thursday: d = "星期五"; break; case DayOfWeek.Tuesday: d = "星期六"; break; case DayOfWeek.Wednesday: d = "星期日"; break; default: break; } d就是你要的星期