performing a child classes method when called as a parent
问题 I have a class Class A, and a class Class B. class B is a child of class A so that: public class Class A { public DateTime FileStart { get { return Header.StartTime; } set{ } } ... ... } and public class B : A { FileInfo zippedA; public A myA = null; internal B(FileInfo mFileInfo) { ... //collects the same data as A from the fileinfo such as start time... ... } public A getAData() { UnZipFile(zippedA); return myA; } ... } So I'm looking for a way to call getAData() whenever an object of B is