No, it's possible, but you have to give the compiler some acceptable context of what "TC" is. That third parameter, TC, isn't used anywhere else in your code, so it could be anything, therefore, the compiler complains. If you add an incoming parameter to your extension method of the type TC, however, you can accomplish a situation where the compiler can infer the actual type of TC, and then you don't even have to indicate what the types are when you call the method:
class Program
{
static void Main(string[] args)
{
var a = new A<B, B>();
string tc = "Hi!";
a.DoIt(tc);
}
}
static class Ext
{
public static A<TA, TB> DoIt<TA, TB, TC>(this A<TA, TB> a, TC c)
{
return a;
}
}
class A<TA, TB> { }
class B { }
But you have to give the compiler some context.
That being said, specifying generic parameters is an all-or-nothing endeavor. Either the compiler can infer the types of every generic type parameter, or it can't, and you have to tell it what all of them are.