System.TypeInitializationclasscastexceptionn

其他回答(1)
设定下初始值就好了。就像c#里面一个对象声明后必须设定初始值。不需设定的是系统自己已经默认有初始值。int i;
系统默认初始值为0的一样。
园豆:2765
园豆:2765
&&&您需要以后才能回答,未注册用户请先。跪求FINS安装异常是什么情况。捣鼓一晚上了。。_上古卷轴吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0可签7级以上的吧50个
本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:301,865贴子:
跪求FINS安装异常是什么情况。捣鼓一晚上了。。
XP系统。 .NET安装到最新的了。FINS各版本都试过了。全都这样。。有大神在吗。。
本人是盗版 = = 这几天...
进也进得了游戏,语音什...
内存够了,路径对了,为...
是是是,都怪我,怪我不...
我下得版本是国际中文版...
问题解决就删帖了,如题...
手机总是弹出让我安装软...
不墨迹!直接上图
刚才接了一个电话,地点...
网上买的,有谁会安装
有这方面熟悉的求你帮帮...
这电脑配置适合安装win7...
碰到根目录了?
无心整合功能里面有fins
我英文渣看不懂,因为没有遇到过,楼主先把英文翻译下,一切都解决了~-正在开启牛逼模式 请稍后…. ▉▉▉▉▉99.9% 正在加载牛逼模式...............出现错误,系统已崩溃。 正在返回逗逼模式………….....   -      --来自渣渣爪机客户端
点下details
【COS PARTY】公会美女迎新派对
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************System.TypeInitializationException: The type initializer for *FNIScommon* threw an exception. ---& System.Exception: Cannot create ActiveX component.
at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName)
at GenerateFNISforUsers.FNIScommon1.FNIScommon..cctor()
--- End of inner exception stack trace ---
at GenerateFNISforUsers.FNIScommon1.FNIScommon.LogOutput(String LogText, Boolean ToTextBox)
at GenerateFNISforUsers.FNIScommon1.FNIScommon.WriteError()
at GenerateFNISforUsers.GenerateFNISUsers.Main()
at GenerateFNISforUsers.GenerateFNISUsers.Button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Loaded Assemblies **************mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0. (RTMGDR.0)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll----------------------------------------GenerateFNISforUsers
Assembly Version: 3.5.0.0
Win32 Version: 3.5.0.0
CodeBase: file:///F:/ShangGu/TESV.Skyrim_V1.3_CHS-Gamersky/TESV.Skyrim_V1.3_CHS-Gamersky/Data/tools/GenerateFNIS_for_Users/GenerateFNISforUsers.exe----------------------------------------Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 10.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll----------------------------------------System
Assembly Version: 4.0.0.0
Win32 Version: 4.0. built by: RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c/System.dll----------------------------------------System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c/System.Core.dll----------------------------------------System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0. built by: RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c/System.Windows.Forms.dll----------------------------------------System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0. built by: RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.0)
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c/System.Runtime.Remoting.dll----------------------------------------************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled.For example:&configuration&
&system.windows.forms jitDebugging=&true& /&&/configuration&When JIT debugging is enabled, any unhandled exceptionwill be sent to the JIT debugger registered on the computerrather than be handled by this dialog box.
ps.是fnis不是fins  /我的确偶尔会说谎,但是只说真话而过一生的人类不也没有吗,人类没有被造的那么完美。   
内&&容:使用签名档&&
保存至快速回贴程序报 System.TypeInitializationException 错误
[问题点数:100分,结帖人yg123aa]
程序报 System.TypeInitializationException 错误
[问题点数:100分,结帖人yg123aa]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
2014年2月 .NET技术大版内专家分月排行榜第二
2014年4月 .NET技术大版内专家分月排行榜第三2014年3月 .NET技术大版内专家分月排行榜第三2013年10月 .NET技术大版内专家分月排行榜第三
本帖子已过去太久远了,不再提供回复功能。类型初始值设定项引发异常_百度知道
类型初始值设定项引发异常
enum UrlCity{
上海, 广州, 深圳, 北京}public class _Message{ public static UrlCity C}上面是 一个静态类的代码和一个枚举但是
当我需要对UrlCity 进行 赋值的时候 如下 _Message.City=UrlCity.上海这时候就抛出异常 :未处理 System.TypeInitializationException
Message=“_Message”的类型初始值设定项引发异常。
Source=NewPost2014
TypeName=_Message
StackTrace:
在 NewPost2014.FrmMain.Start()
在 NewPost2014.FrmMain.button6_Click(Object sender, EventArgs e)
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
在 System.Windows.Forms.Button.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
在 System.Windows.ponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.Run(Form mainForm)
在 NewPost2014.Program.Main()
InnerException: System.ArgumentException
Message=已添加了具有相同键的项。
Source=mscorlib
StackTrace:
在 System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
在 System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
在 System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
在 _Message..cctor()
InnerException:
提问者采纳
异常跟踪信息给的提示很明确(如上图红框):在你的class _Message 的构造函数中,对Dicitionary'2集合操作的Add( )有错误(添加了重复键值的项),从而引发了异常。enum UrlCity {……}&以及_Message.City=UrlCity.上海&没有错误
提问者评价
哈哈 失误 确实 Dicitionary 集合 我定义的时候赋值Copy之后没有检测 3个键值完
其他类似问题
为您推荐:
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 a system exception 的文章

 

随机推荐