In a WinForm Application I Store My ConnectionString in App.Confing File.How Can I split this connectionstring to some Data like username,DataBaseName,Password and other thing Dynamically?
I don't understand why all MSDN examples show ugly way by using Keys.
We can access primary data through properties:
SqlConnectionStringBuilder decoder = new SqlConnectionStringBuilder(connectionString);
string UserID = decoder.UserID;
string Password = decoder.Password;
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder.aspx
And what you exactly need is: http://msdn.microsoft.com/en-us/library/d7z89tex.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With