このコードはループで実行されます。38回目の実行後、テキストファイルに出力される文字列は、2番目の「M」の直後で切断され、コンマも印刷されず、すべての印刷が停止して終了します。
これの原因は何でしょうか?
private static void LogPayment(CDefeasancePayment paymentToLog, System.IO.StreamWriter outfile)
{
string line = "AddDefeasancePayment(DateTime.Parse(\"" + paymentToLog.PaymentDate.ToShortDateString() +
"\"), " + paymentToLog.Interest +
"M, " + paymentToLog.Principal + "M, DateTime.Parse(\"" +
paymentToLog.StripDate.ToShortDateString() + "\"), " + paymentToLog.StripPrice +
"M);\n";
outfile.Write(line);
}