I'm using ReSharper to refactor a static method to an instance method, but ReSharper is throwing an error that says:
method has no suitable parameter that can be made into 'this'
What does this mean? Here is my class method:
public static DateTime PreviousOrCurrentQuarterEnd(DateTime date)
{
Quarter qrtr = GetQuarter(date);
DateTime endOfQuarter = GetEndOfQuarter(date.Year, qrtr);
if (endOfQuarter == date)
return date;
else
{
DateTime startOfLast = GetStartOfQuarter(date.Year, qrtr);
return startOfLast.AddDays(-1);
}
}
Both GetEndOfQuarter and GetStartOfQuarter are other static methods inside the same class.