Hi
I have a base class X and a few that inherits from it.
I have a static function in the base class and I need to find out what is the type of the class I currently in.
I can't use GetType or typeof because it is static.
Could it be with generics
Thanks
Avi

Get type of class in a static method
rulertbca
{
static void staticmember()
{
Type t = typeof(Class1);
}
}
James Johnston
JIM.H.
nobugz, lets say I have Class2 that inherits from Class1. Now what would you do
The thing I want is something like this : Type t = typeof(the class i am in);
Any way, I found out this way :
class
A<T>{
public static void Type(){
Console.WriteLine(typeof(T).ToString());}
}
class B : A<B>{
}