When trying to execute my project I got the error:
System.NullReferenceException: 'Object reference not set to an instance of an object. '
I have a bank class with the constructor:
public bd()
{
conexao = new SqlConnection(ConfigurationManager.ConnectionStrings["conexaoBD"].ConnectionString);
conexao.Open();
}
I'm using Visual Studio 2017, can anyone help me with this error? Thanks in advance.