Run length encoding in C#
One thing I noticed.  You're modifying the loop counter inside the loop to run another loop.  This is one way in a large project to create unseen bugs. By keeping track of the previous character it is fairly easy to code this with only one loop.

Your trapping strings that have other characters besides letters, but you're neglecting empty strings and null.

Here's one way the revised code can look:

static string Encode(string input)
{
    if (input == null || input.Length == 0)
    {
        ArgErrHandler("String must have at least one letter.");
    }
    if (input.Any(x =&gt; !char.IsLetter(x)))
    {
        ArgErrHandler("String must have only letters.");
    }
    if (input.Length == 2 || input.Length == 1)
    {
        return (input.Length == 1 || input[0] != input[1]) ? input : $"{input[0]}{2}";
    }
    int limit = input.Length - 1;
    int counter = 1;
    StringBuilder sb = new StringBuilder();
    int i = 1;
    char prev = '\0';
    do
    {

        prev = input[i - 1];
        if (input[i] == prev)
        {
            ++counter;
        }
        else
        {
            if (counter &gt; 1)
            {
                sb.Append($"{prev}{counter}");
            }
            else
            {
                sb.Append(prev);
            }
            prev = input[i];
            counter = 1;
        }
    } while (++i &lt; limit);
    if (input[i] == prev)
    {
        ++counter;
        sb.Append($"{prev}{counter}");
    }
    else
    {
        if (counter &gt; 1)
        {
            sb.Append($"{prev}{counter}{input[i]}");
        }
        else
        {
            sb.Append($"{prev}{input[i]}");
        }
    }
    return $"{sb}";
}
private static void ArgErrHandler(string message)
{
    throw new ArgumentException(message);
}