// Always have a default constructor. public TemplateConnection() { // Initialize the connection object into the closed state. _state = ConnectionState.Closed; /* * Obtain a connection to the database. In this case, * use the SampleDb class to simulate a connection to * a real database. */ _sampleDb = new SampleDb(); }
// Always have a default constructor. public TemplateConnection() { // Initialize the connection object into the closed state. m_state = ConnectionState.Closed; /* * Obtain a connection to the database. In this case, * use the SampleDb class to simulate a connection to * a real database. */ m_sampleDb = new SampleDb(); }