csharp get first and last day of current month

Code Example - csharp get first and last day of current month

                
                        get first and last day of current month
                    
                
 

csharp find start and end of month from object date

                        
                                DateTime date = ...
var firstDayOfMonth = new DateTime(date.Year, date.Month, 1);
var lastDayOfMonth = firstDayOfMonth.AddMonths(1).AddDays(-1);