Help with Singleton - Setting Auto Properties?
<p>I'm trying to set my Auto Properties but they are non-static and so I get the error "Cannot access non-static property in static context" when trying to set the properties Credentials, Certificate, and UrlEndPoint.</p>

<pre><code>public class PayPalProfile
{
    #region Fields

    static PayPalProfile _instance;

    #endregion

    #region Constructors

    PayPalProfile()
    {
        // is only called if a new instance is created
        SetProfileState();
    }

    #endregion

    #region Properties

    public static PayPalProfile CurrentProfile
    {
        get
        {
            if (_instance == null)
                _instance = new PayPalProfile();

            return _instance;
        }
    }

    public CustomSecurityHeaderType Credentials { get; private set; }

    public X509Certificate2 Certificate { get; private set; }

    public string UrlEndPoint { get; private set;}

    #endregion

    #region Methods

    private static void SetProfileState()
    {
        // Set the profile state
        SetApiCredentials();
        SetPayPalX509Certificate();
    }

    private static void SetApiCredentials()
    {
        Credentials = new CustomSecurityHeaderType
                           {
                                Credentials =
                                {
                                    Username = PayPalConfig.CurrentConfiguration.ApiUserName,
                                    Password = PayPalConfig.CurrentConfiguration.ApiPassword
                                }
                           };

        UrlEndPoint = PayPalConfig.CurrentConfiguration.ExpressCheckoutSoapApiEndPoint;
    }


    private static void SetPayPalX509Certificate()
    {
        PayPalCerfiticate paypalCertificate = new PayPalCerfiticate();

        Certificate = paypalCertificate.PayPalX509Certificate;
    }

    #endregion
}
</code></pre>
