D
Derrick Morin
I can use the following to determine the Type of the current instance.
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType
What I want is the Type of the sub class instance. Any ideas? Here's an
example.
namespace myNamespace
{
public class A
{
protected Type myType =
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType;
protected Type myChildType = ????
}
public class B : A
{
}
}
When I create and instance of B, the myType member is a Type with name
"myNamespace.A". I want the myChildType member to be the Type with name
"myNamespace.B". Any ideas?
I DO NOT want to modify class B.
Thanks
Derrick
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType
What I want is the Type of the sub class instance. Any ideas? Here's an
example.
namespace myNamespace
{
public class A
{
protected Type myType =
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType;
protected Type myChildType = ????
}
public class B : A
{
}
}
When I create and instance of B, the myType member is a Type with name
"myNamespace.A". I want the myChildType member to be the Type with name
"myNamespace.B". Any ideas?
I DO NOT want to modify class B.
Thanks
Derrick