B
Bob Rock
Hello,
is there a way of retrieving the type of the class containing a static
method from the method itself when it gets called?
I have this situation: an abstact class that defines a static method, a
class that derives from the abstract class and I need
to retrieve the type of the concrete class when calling the static method.
public abstact class MyAbstact
{
public static MyMethod()
{
// is there a way of getting the type of the class (i.e. MyConcrete) from
inside here???
}
}
public class MyConcrete : MyAbstact
{
public MyOtherMethod()
{
MyConcrete.MyMethod() // calling the static method defined in the
abstract class
}
}
Regards,
Bob Rock
is there a way of retrieving the type of the class containing a static
method from the method itself when it gets called?
I have this situation: an abstact class that defines a static method, a
class that derives from the abstract class and I need
to retrieve the type of the concrete class when calling the static method.
public abstact class MyAbstact
{
public static MyMethod()
{
// is there a way of getting the type of the class (i.e. MyConcrete) from
inside here???
}
}
public class MyConcrete : MyAbstact
{
public MyOtherMethod()
{
MyConcrete.MyMethod() // calling the static method defined in the
abstract class
}
}
Regards,
Bob Rock