Possible Duplicate:
.NET: Determine the type of “this” class in its static method
How can I make GetType() accessible from a static method?
I have this abstract base class
abstract class MyBase
{
public static void MyMethod()
{
var myActualType = GetType(); // this is an instance method
doSomethingWith(myActualType);
}
}
and an implementation of that class. (I could have many implementations.)
class MyImplementation : MyBase
{
// stuff
}
How can I get myActualType to be typeof(MyImplementation)?