disable broken tests on net_4_0
[mcs.git] / docs / ecma334 / 20.4.xml
blob79d44ba70f9f1591d967a9ed2af1c94cfc984787
1 <?xml version="1.0"?>
2 <clause number="20.4" title="Interface implementations">
3   <paragraph>Interfaces may be implemented by classes and structs. To indicate that a class or struct implements an interface, the interface identifier is included in the base class list of the class or struct. <example>[Example: For example: <code_example><![CDATA[
4 interface ICloneable  
5 {  
6    object Clone();  
7 }  
8 interface IComparable  
9 {  
10    int CompareTo(object other);  
11 }  
12 class ListEntry: ICloneable, IComparable  
13 {  
14    public object Clone() {...}  
15    public int CompareTo(object other) {...}  
16 }  
17 ]]></code_example>end example]</example> </paragraph>
18   <paragraph>A class or struct that implements an interface also implicitly implements all of the interface's base interfaces. This is true even if the class or struct doesn't explicitly list all base interfaces in the base class list. <example>[Example: For example: <code_example><![CDATA[
19 interface IControl  
20 {  
21    void Paint();  
22 }  
23 interface ITextBox: IControl  
24 {  
25    void SetText(string text);  
26 }  
27 class TextBox: ITextBox  
28 {  
29    public void Paint() {...}  
30    public void SetText(string text) {...}  
31 }  
32 ]]></code_example></example></paragraph>
33   <paragraph>
34     <example>Here, class TextBox implements both IControl and ITextBox. end example]</example>
35   </paragraph>
36 </clause>