Your code is the improper use of inheritance. First of all, you need to understand what you're trying to accomplish, in this case you want to calculate salaries. Daily, Weekly or Monthly are strategies for doing the calculation.
You should consider each class an encapsulation of the business rule used to implement the calculations. Weekly makes no design sense to inherit from Daily, the same is for Monthly and Weekly.
The better way is this
public abstract AbstractSalaryCalculator
{
//note that the calculation returns something, as this is basically a service
public virtual decimal Calculate();
}
public class DailySalaryCalculator:AbstractSalaryCalculator
{
public override decimal Calculate()
{
//do stuff
//return result
}
}
public class WeeklySalaryCalculator:AbstractSalaryCalculator
{
public override decimal Calculate()
{
//do stuff
//return result
}
}
public class MonthlySalaryCalculator:AbstractSalaryCalculator
{
//probably is better for the daily calculator to be injected via the constructor
public override decimal Calculate(DailySalaryCalculator daily)
{
//use daily to do stuff
//return result
}
}
var daily= new DailySalaryCalculator();
var monthly=new MonthlySalaryCalculator();
var result=monhtly.Calculate(daily);
Explanation
The point is to define calculators that handle a specific aspect of the business rules and then (re)use them in a decoupled way. All are calculators but a Weekly is not a Daily. A Weekly/Monthly can use a Daily because this is the relation between these concepts.
Inheritance means the child is a more specific concept of the parent's. In your use case, there is nothing more specific, they're just different ways to calculate a salary.
That's why in my code, the monthly calc makes use of the daily one, but it doesn't inherit from it.