To Start Of Month - CSharp System

CSharp examples for System:DateTime Month

Description

To Start Of Month

Demo Code


using System;//from  w  w w . j  a  va2s . c  om

public class Main{
        public static DateTime ToStartOfMonth(this DateTime date)
      {
         return new DateTime(date.Year, date.Month, 1);
      }
}

Related Tutorials