Awkward title I know, this is best explained in code. Given a set of classes:
public abstract class MyBaseType
{
public string Message { get; set; }
}
publi
The problem here is you are not really expressing a generality. You have to implement OutputFormattedTypeInfo
for each and every base type, so you might as well forget about the generic method and simply use the overloads (you do not need generics here):
public void OutputFormattedTypeInfo(BaseType theType)
{
// ...
}
public void OutputFormattedTypeInfo(MySuperType theType)
{
// ...
}
public void OutputFormattedTypeInfo(MyOtherSuperType theType)
{
// ...
}