I am getting the following error
Inconsistent accessibility: parameter type \'Db.Form1.ConnectionString\' is less accessible than method \'Db.Form1.B
As described here, classes and structs are private by default if no access modifier is specified. Where you have defined your struct as:
struct ConnectionString
{
public string Provider;
public string DataSource;
public string UserId;
public string Password;
public string Database;
}
you need to instead define it as:
public struct ConnectionString
{
public string Provider;
public string DataSource;
public string UserId;
public string Password;
public string Database;
}