i try to connect with my MySql connection in a other .cs
file but i cant reach the connection string con
which is located in the MySQL.cs
here is the code i am using:
MainPage.cs
Data_Layer.MySQL mm = new Data_Layer.MySQL();
private async void LoginKlik(object sender, EventArgs e)
{
try
{
mm.con.Open();
}
catch
{}
finally
{}
I am getting a red line under the line mm.con.Open();
with the statement inaccisebale due protection level
MySQL.cs
namespace VerlofXamarin.Data_Layer
{
public class MySQL
{
MySqlConnection con = new MySqlConnection("Server=arabig.nl;Port=3306;database=arabignl_project;User Id=arabignl_project;Password=JariR0800;charset=utf8");
}
}