我在asp.net中編寫了一個代碼,用於從文件中讀取數據並繪製圖形。在mscorlib.dll中發生未處理的異常'System.StackOverflowException'
它的工作,但一段時間後,當我運行該程序,此異常出現
在此
「未處理的類型‘System.StackOverflowException’ mscorlib.dll中發生的異常」在代碼中的聲明:
if (File.Exists(fName)) <----(here is the exception)
{
stream = File.Open(fName, FileMode.Open);
g_day = Deserialize(stream);
stream.Close();
int cn = 0;
if (g_day.Values.Count != 0)
cn = g_day.Values[g_day.Values.Count - 1].Value;
Label1.Text = cn.ToString();
}
使用編輯器的格式功能,以便我們可以讀取您的代碼。 – mwilson 2010-05-06 15:43:04
這是你提供了Deserialize()函數一部分的代碼片段嗎? – 2010-05-06 15:48:55
哪個版本的.NET?另外,你可以發佈堆棧跟蹤嗎? – Paolo 2010-05-06 15:52:13