G
Guest
I defined a property in a base class that will under certain condition return
its own value, but sometimes needs to pass the implementation to the derived
class. Now the proble is that in the method I need a name of the derived
class to perform some database query. It looks like this:
public abstract class MyAbstractClass
{
protected MyAbstractClass()
{
}
// This implementation will be forced with a derived class
public override string FindInDerivedClass
{
get;
}
public string FindSomething()
{
string found = CalculateSomething(<<<NameOfTheDerivedClass>>>);
if (found != null)
return found;
else
return FindInDerivedClass;
}
}
So the question is, as I need the name of the class that will inherit this
base clase, how do I get the value for the above <<<NameOfTheDerivedClass>>>?
Thank you.
its own value, but sometimes needs to pass the implementation to the derived
class. Now the proble is that in the method I need a name of the derived
class to perform some database query. It looks like this:
public abstract class MyAbstractClass
{
protected MyAbstractClass()
{
}
// This implementation will be forced with a derived class
public override string FindInDerivedClass
{
get;
}
public string FindSomething()
{
string found = CalculateSomething(<<<NameOfTheDerivedClass>>>);
if (found != null)
return found;
else
return FindInDerivedClass;
}
}
So the question is, as I need the name of the class that will inherit this
base clase, how do I get the value for the above <<<NameOfTheDerivedClass>>>?
Thank you.