I have the folowing class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Odbc;
namespace Framework
{
public class OracleProvider
{
private OdbcConnection db { get; private set; }
private String dbUsername = Settings.Default.Username;
private String dbPassword = Settings.Default.Password;
public OracleProvider()
{
connect();
}
public void connect()
{
db = new OdbcConnection("Driver={Microsoft ODBC for Oracle};Server=CTIR; UID="+dbUsername+";PWD="+dbPassword+";");
}
}
}
Now I get the following error:
Error 11: The accessibility modifier of the 'Framework.OracleProvider.db.set' accessor must be more restrictive than the property or indexer 'Framework.OracleProvider.db'
I've been looking at similar questions but haven't really found an answer.
Can anyone explain to me why this is happening? I really want to learn.