用于抛出异常的类型初始化程序 [英] the type initializer for threw an exception

查看:217
本文介绍了用于抛出异常的类型初始化程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

私有数据库db;



公共WashIron(字符串csstring)

{

db = DatabaseFactory。的CreateDatabase(csstring); -----错误线

}







类型''Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory'的初始化程序引发异常。

private Database db;

public WashIron(string csstring)
{
db = DatabaseFactory.CreateDatabase(csstring); -----Error Line
}



The type initializer for ''Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory'' threw an exception.

推荐答案

检查链接下方,可能会有所帮助: - < br $> b $ b

http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/03298844-9fdf-4149-bde4-94f695cc43e8/ [ ^ ]



[ ^ ]
Check Below Links, Might be helpful:-

http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/03298844-9fdf-4149-bde4-94f695cc43e8/[^]

Im getting the error when i''m trying to connect to SQL[^]


这篇关于用于抛出异常的类型初始化程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆