Hello, I have found an issue that I am unable to resolve. Does anyone know a fix for this Type Initialization Exception based on the exception details i've included. Thanks, Jake
System.TypeInitializationException was unhandled
HResult=-2146233036
Message=The type initializer for 'TextEditor.Character' threw an exception.
Source=TextEditor
TypeName=TextEditor.Character
StackTrace:
at TextEditor.Character..ctor()
at TextEditor.TextEditor.UpdateBlock(Point position) in c:\users\<my name>\documents\visual studio 2010\Projects\TextEditor\TextEditor\TextEditor.cs:line 38
at TextEditor.TextEditor..ctor() in c:\users\<my name>\documents\visual studio 2010\Projects\TextEditor\TextEditor\TextEditor.cs:line 21
at TextEditor.Program.Main() in c:\users\<my name>\documents\visual studio 2010\Projects\TextEditor\TextEditor\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.IndexOutOfRangeException
HResult=-2146233080
Message=Index was outside the bounds of the array.
Source=TextEditor
StackTrace:
at TextEditor.PixelMap.set_Item(Int32 x, Int32 y, Boolean value) in c:\users\<my name>\documents\visual studio 2010\Projects\TextEditor\TextEditor\TextEditor.cs:line 138
at TextEditor.PixelMap.Set(Boolean b, Int32 x, Int32 y) in c:\users\<my name>\documents\visual studio 2010\Projects\TextEditor\TextEditor\TextEditor.cs:line 127
at TextEditor.PixelMap..ctor(Image image) in c:\users\<my name>\documents\visual studio 2010\Projects\TextEditor\TextEditor\TextEditor.cs:line 109
at TextEditor.PixelMap..ctor(String path) in c:\users\<my name>\documents\visual studio 2010\Projects\TextEditor\TextEditor\TextEditor.cs:line 92
at TextEditor.Character.FromImageSimple(Char letter) in c:\users\<my name>\documents\visual studio 2010\Projects\TextEditor\TextEditor\TextEditor.cs:line 220
at TextEditor.Character..cctor() in c:\users\<my name>\documents\visual studio 2010\Projects\TextEditor\TextEditor\TextEditor.cs:line 247
InnerException: