public DatabaseObject(params string[] values) { //Constructor type = values[0]; databasename = values[1]; if (values.Length == 6) { ipaddress = values[2]; port = values[3]; username = values[4]; password = values[5]; } if (type == "mysql") { sql_connection = new MySQL(); sql_connection.OpenConnection(getMySQLFormattedConnectionString()); } else if (type == "sqlite") { sql_connection = new SQLite(); sql_connection.OpenConnection(databasename); } else { Logger.addMessage(Logger.LogType.Error, "Database type does not match one of the supported types."); } }