Q: How to convert day and compare this with first day of month? EDITED: (sorry, English is not my main language, and I sincerely apologize to all people who read this question.)
I edited my question to explain my problem. Sorry about that.
I want to compare two days. When I add data to it and save the day in one file time_was_send.txt.
Then it should compare with the first day of the current month. If it is true true, it will execute method SendMail.sendDailyMail.
I'm having problems with getfirstdayoflastmonth() method it always subtracts 1 month while I want it to take the first day of the current month.
I just want to compare if they be the same day and month or not - the year is not important. 
So I want to compare something like this.
26/12 - read from file time_was_send.txt vs getfirstdayoflastmonth(currentDay) while currentDay = 1/12.
To help you to understand, here is my code,
string path = "C:\\time_was_send.txt";
string timeFromFile = ReadFromFile(path);
DateTime m_timeFromFile = DateTime.ParseExact(timeFromFile, "dd-MM-yyyy", null);
string s = now.ToString("dd-MM-yyyy");
DateTime timeNow = DateTime.ParseExact(s, "dd-MM-yyyy", null);

if (m_timeFromFile == procedureMethod.getfirstdayoflastmonth(timeNow))
{
    try
    {
        SendMail.sendDailyMail(listXML);
    }
    catch{}
}

Here is getfirstdayoflastmonth() method:
public static DateTime getfirstdayoflastmonth(DateTime time)
{
    return new DateTime(time.AddMonths(-1).Year, time.AddMonths(-1).Month, 1);
}

Update 1:
I resolved my problem.
In if() statement, I add .Day and .Month to compare.
It works. Thanks to all people who helped me.
if (m_timeFromFile.Day == procedureMethod.getfirstdayoflastmonth(timeNow).Day && m_timeFromFile.Month == procedureMethod.getfirstdayoflastmonth(timeNow).Month)
{
    try
    {
        SendMail.sendDailyMail(listXML);
    }
    catch{}
}

I edited AddMonths(-1) to AddMonths(0).
public static DateTime getfirstdayoflastmonth(DateTime time)
{
    return new DateTime(time.AddMonths(-1).Year, time.AddMonths(0).Month, 1);
}


A: To get the first day of the month, you could make use of DateTime class methods and properties alone.
DateTime dt = DateTime.Now; //change this to any date you want
DateTime firstDayOfMonth = dt.AddDays(1-dt.Day); //the trick is here, minus the DatetTime by the current day (of month) + 1, you necessarily get the first day of the month
DayOfWeek dow = firstDayOfMonth.DayOfWeek; //this is the first day of the month (this month's first day is Tuesday)

If you need first day of month, use firstDayOfMonth. If you need the day of week on the day, use dow. If you want to compare the firstDayOfMonth with some other DateTime but only interested in comparing the date, simply do:
firstDayOfMonth.Date == someOtherDays.Date

And if you need to use the time too, you could check TimeOfDay.
Basically, try to find out more about the DateTime class methods and properties. The class is really handy to use for such task as yours!
Edit: to compare both day and month (but not year), use DateTime.Day and DateTime.Month properties

A: DateTime dateTime = DateTime.Now;

DateTime firstDayOfMonth = new DateTime(dateTime.Year,dateTime.Month,1);

if (firstDayOfMonth.DayOfWeek.Equals(dateTime.DayOfWeek))

    MessageBox.Show("The day is matching with first day of the month" + dateTime.DayOfWeek);

Something like this would help you.
