title: accessor must be more restrictive than the property or indexer
body: <p>I have the folowing class:</p>
  
  <pre><code>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+";");    
          }        
      }
  }
  </code></pre>
  
  <p>Now I get the following error:</p>
  
  <blockquote>
    <p>Error 11: The accessibility modifier of the 'Framework.OracleProvider.db.set' accessor must be more restrictive than the property or indexer 'Framework.OracleProvider.db'</p>
  </blockquote>
  
  <p>I've been looking at similar questions but haven't really found an answer.</p>
  
  <p>Can anyone explain to me why this is happening? I really want to learn.</p>