Check out example codes for "c# find start and end of month from object date". It will help you in understanding the concepts better.
Code Example 1
DateTime date = ...
var firstDayOfMonth = new DateTime(date.Year, date.Month, 1);
var lastDayOfMonth = firstDayOfMonth.AddMonths(1).AddDays(-1);
Learn ReactJs, React Native from akashmittal.com