我目前正在本地化 Windows Phone 应用程序,但我已经开始在 DateTime.Now.ToString() 上获取索引超出范围异常。
我尝试更改计算机的时区,但错误仍然存在。
我不确定是什么导致了这个问题或如何解决它。
有任何想法吗?提前致谢!
堆栈跟踪(根据要求添加)
mscorlib.dll!System.Globalization.DateTimeFormatInfo.GetYearMonthPattern(int calID = 1) + 0x25 bytes
mscorlib.dll!System.Globalization.DateTimeFormatInfo.InitializeOverridableProperties() + 0x94 bytes
mscorlib.dll!System.Globalization.DateTimeFormatInfo.Calendar.set(System.Globalization.Calendar value = {System.Globalization.GregorianCalendar}) + 0x1a8 bytes
mscorlib.dll!System.Globalization.DateTimeFormatInfo.DateTimeFormatInfo(System.Globalization.CultureTableRecord cultureTable = {System.Globalization.CultureTableRecord}, System.Globalization.Calendar cal = {System.Globalization.GregorianCalendar}) + 0x29 bytes
mscorlib.dll!System.Globalization.CultureInfo.DateTimeFormat.get() + 0x19 bytes
mscorlib.dll!System.Globalization.CultureInfo.GetFormat(System.Type formatType = {Name = "DateTimeFormatInfo" FullName = "System.Globalization.DateTimeFormatInfo"}) + 0x22 bytes
mscorlib.dll!System.Globalization.DateTimeFormatInfo.CurrentInfo.get() + 0x2a bytes
mscorlib.dll!System.DateTime.ToString()
> QuickAirtime.dll!QuickAirtime.PaymentSummary.btnTransactionClick(object sender = {System.Windows.Controls.Button}, System.Windows.RoutedEventArgs e = {System.Windows.RoutedEventArgs}) Line 78 + 0x2 bytes C#
System.Windows.dll!System.Windows.Controls.Primitives.ButtonBase.OnClick() + 0x1f bytes
System.Windows.dll!System.Windows.Controls.Button.OnClick() + 0x1f bytes
System.Windows.dll!System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs e = {System.Windows.Input.MouseButtonEventArgs}) + 0x4e bytes
System.Windows.dll!System.Windows.Controls.Control.OnMouseLeftButtonUp(System.Windows.Controls.Control ctrl = {System.Windows.Controls.Button}, System.EventArgs e = {System.Windows.Input.MouseButtonEventArgs}) + 0xc bytes
System.Windows.dll!MS.Internal.JoltHelper.FireEvent(System.IntPtr unmanagedObj = 227599168, System.IntPtr unmanagedObjArgs = 227256368, int argsTypeIndex = 169, int actualArgsTypeIndex = 169, string eventName = "M@@4") + 0x115 bytes
[External Code]