Jon Jagger
jon@jaggersoft.com
Table of Contents 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Notes DownloadECMA-334 C# Language Specificationpreviousnextprevious at this levelnext at this level 10 Basic conceptsprevious at this levelnext at this level 10.5 Member accessprevious at this levelnext at this level 10.5.4 Accessibility constraints Paragraph 11 Several constructs in the C# language require a type to be at least as accessible as a member or another type. 2 A type T is said to be at least as accessible as a member or type M if the accessibility domain of T is a superset of the accessibility domain of M. 3 In other words, T is at least as accessible as M if T is accessible in all contexts in which M is accessible. Paragraph 21 The following accessibility constraints exist: [Example: In the example
class A {...}  
public class B: A {...}  
the B class results in a compile-time error because A is not at least as accessible as B. end example]
[Example: Likewise, in the example
class A {...}  
public class B  
{  
   A F() {...}  
   internal A G() {...}  
   public A H() {...}  
}  
the H method in B results in a compile-time error because the return type A is not at least as accessible as the method. end example]
{ JSL }
Jagger Software Ltd
Company # 4070126
VAT # 762 5213 42
Valid HTML 4.01Valid CSS