Start Of Week - CSharp System

CSharp examples for System:DateTime Week

Description

Start Of Week

Demo Code


using System;/* ww  w . j  a v a 2s .co  m*/

public class Main{
        public static DateTime StartOfWeek(this DateTime date)
		{
			return date.AddDays((int)date.DayOfWeek);
		}
}

Related Tutorials