disable broken tests on net_4_0
[mcs.git] / docs / ecma334 / 20.1.2.xml
blobff2a62e4d52a859bd308d9a429508be057e17544
1 <?xml version="1.0"?>
2 <clause number="20.1.2" title="Base interfaces">
3   <paragraph>An interface can inherit from zero or more interfaces, which are called the explicit base interfaces of the interface. When an interface has one or more explicit base interfaces, then in the declaration of that interface, the interface identifier is followed by a colon and a comma-separated list of base interface identifiers. <grammar_production><name><non_terminal where="20.1.2">interface-base</non_terminal></name> : <rhs><terminal>:</terminal><non_terminal where="17.1.2">interface-type-list</non_terminal></rhs></grammar_production></paragraph>
4   <paragraph>The explicit base interfaces of an interface must be at least as accessible as the interface itself (<hyperlink>10.5.4</hyperlink>). </paragraph>
5   <paragraph>
6     <note>[Note: For example, it is a compile-time error to specify a private or internal interface in the  <non_terminal where="20.1.2">interface-base</non_terminal> of a public interface. end note]</note>
7   </paragraph>
8   <paragraph>It is a compile-time error for an interface to directly or indirectly inherit from itself. </paragraph>
9   <paragraph>The base interfaces of an interface are the explicit base interfaces and their base interfaces. In other words, the set of base interfaces is the complete transitive closure of the explicit base interfaces, their explicit base interfaces, and so on. An interface inherits all members of its base interfaces. <example>[Example: In the example <code_example><![CDATA[
10 interface IControl  
11 {  
12    void Paint();  
13 }  
14 interface ITextBox: IControl  
15 {  
16    void SetText(string text);  
17 }  
18 interface IListBox: IControl  
19 {  
20    void SetItems(string[] items);  
21 }  
22 interface IComboBox: ITextBox, IListBox {}  
23 ]]></code_example>the base interfaces of IComboBox are IControl, ITextBox, and IListBox. In other words, the IComboBox interface above inherits members SetText and SetItems as well as Paint. end example]</example> </paragraph>
24   <paragraph>A class or struct that implements an interface also implicitly implements all of the interface's base interfaces. </paragraph>
25 </clause>