You can't do this because your only route to a derived type from one of its bases is from an instance - and static methods don't take an instance.
I'm hoping that your example is for simplicity because otherwise re-implementing GetType() seems a bit pointless - since the object.GetType()
will do exactly what you want.
If you actually need to do this via a statically invoked method - you can't because no type information is actually available to a static method (as I say in the first paragraph).
If you actually invoking this method via an instance (but I must ask why!?) then you can do one of the following
a) Make your method an instance method on the base. It can then do this.GetType()
(using the .Net base method) and it'll return the ultimate subtype of the instance.
b) Define an extension method for BaseClass
that does something very similar:
public static Type GetType2(this BaseClass instance)
{
return instance.GetType();
}