Ну, у меня есть публичная статическая константа:
public static ChatLine[] chatLine = new ChatLine[numChatLines];
.
Отладка показывает мне этот код (позже в том же файле):
for (int num12 = 0; num12 < numChatLines; num12++)
{
chatLine[num12] = new ChatLine();
}
При наведении курсора на каждую точку данных он показывает, что num12 равно 0, а chatLine - chatLine [0]. Что очень странно, так как мой публичный констант, как я показал вам выше ... Есть идеи, почему это происходит?
.
.
Полная трассировка стека ниже:
System.IndexOutOfRangeException was unhandled
Message=Index was outside the bounds of the array.
Source=Project1
StackTrace:
at Project1.Main.Initialize() in C:\Users\X\My Documents\Project1\Main.cs:line 7590
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Microsoft.Xna.Framework.Game.Run()
at Project1.Program.Main(String[] args) in C:\Users\X\My Documents\Project1\Program.cs:line 14
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at System.Activator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: