惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - tf.li

清理MVC4 Internaet 项目模板清理 SQL2014 尝试读取或写入受保护的内存。这通常指示其他内存已损坏 nodejs 环境配置技巧 mongdb window 服务安装批处理 bower 安装后 jade 引用404问题 我的Prototype模式框架 转自CnBeta 令人深思 [译稿]为什么我们不要 .NET 程序员 JSON.NET、WebService与JQuery协同工作 我修改的IP地址掩码 呵呵~~开心 Ext.Ajax.request 传值问题 从小做大之一---------一切从建模开始 [求助]关于文本行转列的疑问~~ To Terrylee 我的设计模型之小议工厂模式 我的设计模型之装饰者模式 我对线程池的一点理解 面向接口编程之惑 第二版 我的设计模型之适配器模式 我的设计模型之简单工厂
面向接口编程之惑
tf.li · 2008-07-20 · via 博客园 - tf.li

今天总算闲下来 看看王涛的你必须知道的.net了 在OO大原则这一章节 看得尤为仔细 因为刚刚看完 程杰的那本小菜跟大鸟的书啊 在面向接口的时候 发现一个问题

  class Computeruse : IComputerLearn, IComputerToFun, IComputerWork
    
{
        
public Computeruse()
        
{
            Console.WriteLine(
"这个电脑我在用 别管我干嘛!!");
        }

        
    }

    
interface IComputerLearn
    
{
        
void ToLearn();
    }

    
interface IComputerWork
    
{
        
void ToWork();
    }

    
interface IComputerToFun
    
{
        
void ToFun();
    }

 我的一个类同时继承三个接口 但是我如何让这三个接口实现呢 就算我实例化一个ComputerUse对象 还是没有找到三个接口的实现方法 而且在类里面 也不能重载三个接口的方法 接口不是用来限制行为的吗? 怪事!还望高手能够赐教啊