I have seen from time to time questions about various OTP schemes and "OTP" (i.e. stream cipher) schemes. The most common OTP troubles appear to be:


How to extend size of previously generated key or how to generate key.
How to get key material securely to the recipient.


In electronic communication or storage encryption OTP appears scheme that is impossible to make work and if it works benefits are not clear. Requirement that the key needs to be the same size than input seems to be unbearable for many of modern use cases for encryption.

Is there any practice where OTP is useful in modern cryptography except:


As a component used on some proofs.
As a example ideal of encryption algorithm.


I.e.: Is it possible to base on OTP and provide the "information theoretic" strength to hashing (apparently not), authentication, etc.


Question: Cannot access non-static field
Answer: Your problem is in the MyDB constructor. The instance field (MyDB.connectionString) will not be initialized until the call to the base constructor returns, so everything inside base( ... ) is in the static context. Just work with it...

public class MyDB : DatabaseBase
{
    static readonly string connectionString = 
          ConfigurationManager.AppSettings["MyConnectionString"];
    public MyDB() : base(connectionString)
    {
    }
}


or better yet (as suggested by Simon Fox) ...

public class MyDB : DatabaseBase
{
    public MyDB() : base(ConfigurationManager.AppSettings["MyConnectionString"])
    {
    }
}