'threw和exception的类型初始值设定项 [英] the type initializer for '' threw and exception

查看:79
本文介绍了'threw和exception的类型初始值设定项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我继承了Windows表单。上面的警告出现在Connection中。该连接在App.Config中定义,并以父表单的名称调用。



Hello,

I am inheriting a Windows form. The above warning is appearing in line made for Connection. The connection is defined in App.Config and called with name in parent form.

Public connection As New SqlConnection(ConfigurationManager.ConnectionStrings("name").ConnectionString)





请建议



Please advice

推荐答案

请查看以下链接:

VB.NET连接字符串(Web.Config,App.Config) [ ^ ]



如何存储和检索ConnectionStrin g来自vb.net项目中的app.config文件 [ ^ ]
Please have a look on the bellow link :
VB.NET Connection string (Web.Config, App.Config)[^]

How To Store and retrive ConnectionString from app.config file in vb.net project[^]


这篇关于'threw和exception的类型初始值设定项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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