C# Interface 的一点笔记。explicit Interface Implementation

首先看一个Interface

1 Public Interface ISavable
2 {
3 
4 
5 string Save();
6 
7 }

接着让一个Class继承这个Interface

 1 public Class Catgory:ISavable
 2 {
 3 public string Save()
 4 {
 5 
 6 return "catogry save!"
 7 
 8 }
 9 
10 string ISavable.Save()//explicit Interface Implementation
11 {
12 
13 
14 return "Isavable save!"
15 }
16 
17 }

 

 

 

接着看看下面这个图,读者可以自己比较一下,曾经这个问题也是困扰我的问题

 

 

 

 

posted @ 2013-07-03 22:19  futan57  阅读(276)  评论(0编辑  收藏  举报