In .Net is there a class in .Net where you can get the DB name, and all the connection string info without acutally doing a substring on the connection string?
EDIT:
After you initialize the connection with the connection string, you can get those information from properties of the initialized connection object.
Check System.Data.Common.DbConnection.