K
Kevin Grigorenko
I have an abstract class, call it A, with a virtual function from which
I want to handle the default functionality of that method. However,
that method needs the class name of the runtime type of the subclass.
public abstract class A
{
public virtual string B {
get {
string s = somefunction();
s += {Virtual class name here};
return s;
}
}
}
Therefore, if I have a class C that extends A, I want to be able to
call B on an instance of C and get the value of somefunction() + "C"
(without implementing the B property and deferring to the abstract
virtual property).
Any ideas?
Thanks,
Kevin
I want to handle the default functionality of that method. However,
that method needs the class name of the runtime type of the subclass.
public abstract class A
{
public virtual string B {
get {
string s = somefunction();
s += {Virtual class name here};
return s;
}
}
}
Therefore, if I have a class C that extends A, I want to be able to
call B on an instance of C and get the value of somefunction() + "C"
(without implementing the B property and deferring to the abstract
virtual property).
Any ideas?
Thanks,
Kevin