我收到了以下堆栈跟踪。但我无法弄清楚哪个类的哪个函数引发了这个问题。谁能告诉我 MainPage..ctor 是什么?
"帧图像函数偏移
0 coredll.dll xxx_RaiseException 19
1 mscoree3_7.dll 520892
2 mscoree3_7.dll 461967
3 mscoree3_7.dll 534468
4 过渡存根 0
5 System.InternalTimeZoneInfo.TransitionTimeToDateTime 520
6 System.InternalTimeZoneInfo.GetDaylightTime 100
7 System.InternalTimeZoneInfo.GetIsDaylightSavingsFromUtc 128
8 System.InternalTimeZoneInfo.GetUtcOffsetFromUtc 500
9 System.DateTime.ToLocalTime 164
10 System.DateTime.get_Now 72
11 System.DateTime.get_Today 44
12 xxxx.MainPage..ctor 84
13 mscoree3_7.dll 507848
14 mscoree3_7.dll 184683
15 mscoree3_7.dll 183987
16 mscoree3_7.dll 183375
17 System.Reflection.RuntimeConstructorInfo.InternalInvoke 104
18 System.Reflection.RuntimeConstructorInfo.InternalInvoke 1056
19 System.Activator.InternalCreateInstance 1112"
这是主页构造函数:
public MainPage()
{
InitializeButtons();
CreateCalendar();
DisplayHistory();
DisplayStatistics();
}
在里面CreateCalendar
我已经初始化了一个变量DateTime currentDate = DateTime.Today;
这是造成麻烦的那个吗?