public override string ToDisplayString() { string savedPassword = null; if (ConnectionStringBuilder.ContainsKey("Jet OLEDB:Database Password") && ConnectionStringBuilder.ShouldSerialize("Jet OLEDB:Database Password")) { savedPassword = ConnectionStringBuilder["Jet OLEDB:Database Password"] as string; ConnectionStringBuilder.Remove("Jet OLEDB:Database Password"); } string displayString = base.ToDisplayString(); if (savedPassword != null) { ConnectionStringBuilder["Jet OLEDB:Database Password"] = savedPassword; } return(displayString); }