public class A
{
public int F ()
{
// do something
}
}
public class B : A
{
public static B F ()
{
B b = new B ();
// do something more with b
b.base.F (); // this doesn't work
b.A.F (); // this doesn't work either
return b;
}
}
What is the proper syntax for calling A.F()? Please regard that B.F() is a static function.
Edit regarding the “change the name comments”:
Please don’t make the mistake to conclude from this stripped down to the essential example. Actually the functions are meant to read XML, and the function signature is ReadXML (XmlNode parent, int id) across all affected classes.
the following will work (tested now so a proper answer) to call the F method of the A class.
You might like to think about changing the names. I find it hard to believe that a descriptive method name would be the same for something that returns an int and something that returns a class B. Perhaps the latter should have a Create in there somewhere since it seems to be some sort of factory method?