本文介绍了组态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚看到这段代码:

 Dim config As Configuration 
config = ConfigurationManager .OpenExeConfiguration(ConfigurationUserLevel.None)
返回config.ConnectionStrings.ConnectionStrings(key).ConnectionString

如果我是编译器要求编译它,我会自我破坏并带走我的所有代码!

无论发生什么事情 

 My.Settings.MyConnectionString 








Mary

解决方案

Just came across this code:

Dim config As Configuration
config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None)
Return config.ConnectionStrings.ConnectionStrings(key).ConnectionString

If I were a compiler asked to compile that, I would self-destruct and take all your code with me!
Whatever happened to 

My.Settings.MyConnectionString




Mary

解决方案


这篇关于组态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 20:18