CSharp examples for System:DateTime Day
Is Day Off
using System.Threading; using System.Globalization; using System.Collections.Generic; using System;/*w ww .j ava2 s .c om*/ public class Main{ private static bool IsDayOff(int year, int month, int day) { var dateTime = new DateTime(year, month, day); var dayOfWeek = dateTime.DayOfWeek; return (dayOfWeek == DayOfWeek.Sunday || dayOfWeek == DayOfWeek.Wednesday); } }