未处理 System.TypeInitializationException
Message=“ThreadContext”的类型初始值设定项引发异常。
Source=System.Windows.Forms
TypeName=ThreadContext
StackTrace:
在 System.Windows.Forms.Application.ThreadContext.FromCurrent()
在 System.Windows.Forms.WindowsFormsSynchronizationContext..ctor()
在 System.Windows.Forms.WindowsFormsSynchronizationContext.InstallIfNeeded()
在 System.Windows.Forms.Control..ctor(Boolean autoInstallSyncContext)
在 System.Windows.Forms.ScrollableControl..ctor()
在 System.Windows.Forms.ContainerControl..ctor()
在 System.Windows.Forms.Form..ctor()
在 Microsoft.VisualStudio.HostingProcess.ParkingWindow..ctor()
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunParkingWindowThread()
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
InnerException: System.ArgumentOutOfRangeException
Message=加载因子需要介于 0.1 和 1.0 之间。
参数名: loadFactor
Source=mscorlib
ParamName=loadFactor
StackTrace:
在 System.Collections.Hashtable..ctor(Int32 capacity, Single loadFactor)
在 System.Windows.Forms.Application.ThreadContext..cctor()InnerException: 请问这个是什么异常?如何解决?
Message=“ThreadContext”的类型初始值设定项引发异常。
Source=System.Windows.Forms
TypeName=ThreadContext
StackTrace:
在 System.Windows.Forms.Application.ThreadContext.FromCurrent()
在 System.Windows.Forms.WindowsFormsSynchronizationContext..ctor()
在 System.Windows.Forms.WindowsFormsSynchronizationContext.InstallIfNeeded()
在 System.Windows.Forms.Control..ctor(Boolean autoInstallSyncContext)
在 System.Windows.Forms.ScrollableControl..ctor()
在 System.Windows.Forms.ContainerControl..ctor()
在 System.Windows.Forms.Form..ctor()
在 Microsoft.VisualStudio.HostingProcess.ParkingWindow..ctor()
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunParkingWindowThread()
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
InnerException: System.ArgumentOutOfRangeException
Message=加载因子需要介于 0.1 和 1.0 之间。
参数名: loadFactor
Source=mscorlib
ParamName=loadFactor
StackTrace:
在 System.Collections.Hashtable..ctor(Int32 capacity, Single loadFactor)
在 System.Windows.Forms.Application.ThreadContext..cctor()InnerException: 请问这个是什么异常?如何解决?
在 System.Threading.ThreadHelper.ThreadStart()
InnerException: System.ArgumentOutOfRangeException
Message=加载因子需要介于 0.1 和 1.0 之间。
参数名: loadFactor代码怎么写的?传值时加上check()运算