Check out example codes for "find first monday of every month algorithm c#". It will help you in understanding the concepts better.

Code Example 1

public static IEnumerable<DateTime> AllDatesInMonth(int year, int month)
    {
        int days = DateTime.DaysInMonth(year, month);
        for (int day = 1; day <= days; day++)
        {
            yield return new DateTime(year, month, day);
        }
    }

Learn ReactJs, React Native from akashmittal.com