

Introduction
I wrote this class to help developers with building and updating SQL Connection strings. The ConnectionInfo class can parse and build strings through properties and methods of the ConnectionInfo class. The ConnectionInfo class has two methods. The first method ConnectionInfo.Parse(string), parses SQL Connection strings into ConnectionInfo() properties.
i.e
//Parsing Code-----------------------------------
ConnectionInfo Info = new ConnectionInfo();
Info.Parse("Initial Catalog=Northwind;Data Source=localhost;Integrated Security=SSPI;");
MessageBox.Show(Info.DataSource);
//-----------------------------------------------
The second method ConnectionInfo.ToString(), builds a string out of all the available ConnectionInfo() properties.
i.e
//Building Code----------------------------------
ConnectionInfo Info = new ConnectionInfo();
Info.DataSource = "localhost";
Info.InitialCatalog = "Northwind";
MessageBox.Show(Info.ToString());
//-----------------------------------------------
Terms & Conditions
THIS CODE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS CODE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
References
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDataSqlClientSqlConnectionClassTopic.asp