AV1551 mentions three overloads. The next rule (AV1553) combines them into a single method using optional parameters. But that changes behavior, because it defaults parameter count to 0. Consider changing to:
public virtual int IndexOf(string phrase, int startIndex = 0, int count = -1)
{
var length = count == -1 ? someText.Length - startIndex : count;
return someText.IndexOf(phrase, startIndex, length);
}
AV1551 mentions three overloads. The next rule (AV1553) combines them into a single method using optional parameters. But that changes behavior, because it defaults parameter
countto 0. Consider changing to: