DateTime型を使用すると日付の計算を行うことができます。
1日は、DateTime.Todayの日付部分を1に設定することで求められますが、DateTime.Dayに直接値を設定することはできません。代わりにAddDaysを使用します。AddDaysで今日の日付を引いて1を足すと、日付が1になります。末日は、いったん翌月1日を求め、翌月1日の1日前を取得します。
以下のサンプルは、1日および末日の日付を取得し、文字列化してメッセージボックスに表示します。
// 今日の0時0分0秒000を取得
DateTime today=DateTime.Today;
// todayから今日の日付を引くと先月末なのでその次の日
DateTime firstDay=today.AddDays(-today.Day+1);
// 来月1日の1日前
DateTime endDay=firstDay.AddMonths(1).AddDays(-1);
// 日時オブジェクトを文字列化
const string format="yyyy/MM/dd";
string todayText=today.ToString(format);
string firstDayText=firstDay.ToString(format);
string endDayText=endDay.ToString(format);
// 結果を表示
string message=string.Format(
"今日:{0}\r\n1日:{1}\r\n末日:{2}\"
,todayText,firstDayText,endDayText);
MessageBox.Show(message);