索引超出了数组界限
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。
************** 异常文本 **************
System.IndexOutOfRangeException: 索引超出了数组界限。
在 LedControlSystem.AnimationEditor.AnimationEditor_Load(Object sender, EventArgs e) 位置 F:V3.45T3SourceV3.45T3LedControlSystemUserControlAnimationEditor.cs:行号 95
在 System.Windows.Forms.UserControl.OnLoad(EventArgs e)
在 System.Windows.Forms.UserControl.OnCreateControl()
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl()
在 System.Windows.Forms.Control.WmShowWindow(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.ContainerControl.WndProc(Message& m)
在 System.Windows.Forms.Form.WmShowWindow(Message& m)
在 System.Windows.Forms.Form.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 已加载的程序集 **************
mscorlib
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.8922 (WinRelRS4.050727-8900)
基本代码: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
LedControlSystem
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Program%20Files%20(x86)/Led%20Control%20System%20V3/LedControlSystem.exe
----------------------------------------
System
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.8922 (WinRelRS4.050727-8900)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.8922 (WinRelRS4.050727-8900)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.8922 (WinRelRS4.050727-8900)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
ZHUI
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Program%20Files%20(x86)/Led%20Control%20System%20V3/ZHUI.DLL
----------------------------------------
System.Xml
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.8922 (WinRelRS4.050727-8900)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
LedResources
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Program%20Files%20(x86)/Led%20Control%20System%20V3/LedResources.DLL
----------------------------------------
LedControl
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Program%20Files%20(x86)/Led%20Control%20System%20V3/LedControl.DLL
----------------------------------------
AxInterop.ShockwaveFlashObjects
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Program%20Files%20(x86)/Led%20Control%20System%20V3/AxInterop.ShockwaveFlashObjects.DLL
----------------------------------------
System.Windows.Forms.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.8922 (WinRelRS4.050727-8900)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
Interop.ShockwaveFlashObjects
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Program%20Files%20(x86)/Led%20Control%20System%20V3/Interop.ShockwaveFlashObjects.DLL
----------------------------------------
Accessibility
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.8922 (WinRelRS4.050727-8900)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Configuration
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.8922 (WinRelRS4.050727-8900)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
mscorlib.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.8922 (WinRelRS4.050727-8900)
基本代码: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。
例如:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。
限制索引取值范围(0到 (数组长度-1)),或者增加数组的长度
数组元素用整个数组的名字和它自己在数组中的顺序位置来表示。例如,a[0]表示名字为a的数组中的第一个元素,a[1]代表数组a的第二个元素,以此类推。
数组是通过下表进行访问,但超出下标(索引)最大值(数组长度-1)就会访问超出界限
如:int [] arr= new int[2];;
arr[0]=1;
arr[1]=2;
--此数组长度为2,下标最大为1(数组下标从0开始)
--如果下标超出0-1这个范围就会出现索引超出界限问题。
--限制下标(索引)的取值范围,或者数组长度增加都可以防止索引超出界限