ixxhh 2014-12-16 05:34 采纳率: 50%
浏览 1817
已采纳

接口问题?“不实现接口成员”,不知道哪里有问题?

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
public interface IStudent
{
void StudyBase();
}
public interface IEmployee
{
void Work();
}
public interface IInforStudent : IStudent
{
void StudySpecial();
}

public class InfoStudent : IEmployee,IInforStudent
{

    public void Work()
    {
        Console.WriteLine("你的工作任务必须完成");
    }

    public void StudySpecial()
    {
        Console.WriteLine("你是计算机专业的学生,必须学习");
    }
}


class Program
{
    static void Main(string[] args)
    {
        InfoStudent student = new InfoStudent();
        student.Work();
        student.StudySpecial();
   }
}

}

  • 写回答

2条回答

  • threenewbee 2014-12-16 05:38
    关注

    public class InfoStudent : IEmployee,IInforStudent
    {
    public void StudyBase()
    {
    // ...
    }

    public void Work()
    {
        Console.WriteLine("你的工作任务必须完成");
    }
    
    public void StudySpecial()
    {
        Console.WriteLine("你是计算机专业的学生,必须学习");
    }
    

    }

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 Matlab问题解答有两个问题
  • ¥50 Oracle Kubernetes服务器集群主节点无法访问,工作节点可以访问
  • ¥15 LCD12864中文显示
  • ¥15 在使用CH341SER.EXE时不小心把所有驱动文件删除了怎么解决
  • ¥15 gsoap生成onvif框架
  • ¥15 有关sql server business intellige安装,包括SSDT、SSMS。
  • ¥15 stm32的can接口不能收发数据
  • ¥15 目标检测算法移植到arm开发板
  • ¥15 利用JD51设计温度报警系统
  • ¥15 快手联盟怎么快速的跑出建立模型