Created
March 23, 2015 17:06
-
-
Save randyburden/039b9f82a05ce8f8fa48 to your computer and use it in GitHub Desktop.
Enables adding a ConnectionString at runtime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Enables adding a ConnectionString at runtime | |
typeof ( ConfigurationElementCollection ) | |
.GetField( "bReadOnly", BindingFlags.Instance | BindingFlags.NonPublic ) | |
.SetValue( ConfigurationManager.ConnectionStrings, false ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment