Articles → .NET DESIGN PATTERN → Open Close Principle In C#

Open Close Principle In C#






What Does The Open-Close Principle Say?





Open-Close Principle In C#





Example




public class DBOperations
{
    public void Delete()
    { }
 
    public void Upsert(object entity)
    { }
 
    public List<object> GetAll()
    {
        return new List<object>();
    }
}








public class DBOperations
{
    public void Delete()
    { }
 
    public void Upsert(object entity)
    { }
 
    public List<object> GetAll()
    {
        return new List<object>();
    }
}

public class DBOperationsExt : DBOperations
{
    public void ExecuteStoredProcedure(string storedProcName, ....)
    { }
}



Posted By  -  Karan Gupta
 
Posted On  -  Monday, December 28, 2020
 
Updated On  -  Monday, August 22, 2022

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250