我有一个继承架构,如下所示:
public abstract class BaseAttachment
{
public abstract string GetName();
}
public abstract class BaseFileAttachment:BaseAttachment
{
public abstract string GetName();
}
public class ExchangeFileAttachment:BaseFileAttachment
{
string name;
public override string GetName()
{
return name;
}
}
Run Code Online (Sandbox Code Playgroud)
我基本上想调用ExchangeFileAttachment类的GetName()方法; 但是,上述声明是错误的.对此有任何帮助表示赞赏.谢谢