Jon Jagger
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 14 Expressionsprevious at this levelnext at this level 14.5 Primary expressionsprevious at this levelnext at this level 14.5.8 Base access Paragraph 11 A base-access consists of the reserved word base followed by either a "." token and an identifier or an expression-list enclosed in square brackets: base-access : base . identifier base [ expression-list ] Paragraph 21 A base-access is used to access base class members that are hidden by similarly named members in the current class or struct. 2 A base-access is permitted only in the block of an instance constructor, an instance method, or an instance accessor. 3 When base.I occurs in a class or struct, I must denote a member of the base class of that class or struct. 4 Likewise, when base[E] occurs in a class, an applicable indexer must exist in the base class. Paragraph 31 At compile-time, base-access expressions of the form base.I and base[E] are evaluated exactly as if they were written ((B)this).I and ((B)this)[E], where B is the base class of the class or struct in which the construct occurs. 2 Thus, base.I and base[E] correspond to this.I and this[E], except this is viewed as an instance of the base class. Paragraph 41 When a base-access references a virtual function member (a method, property, or indexer), the determination of which function member to invoke at run-time (§14.4.3) is changed. 2 The function member that is invoked is determined by finding the most derived implementation (§17.5.3) of the function member with respect to B (instead of with respect to the run-time type of this, as would be usual in a non-base access). 3 Thus, within an override of a virtual function member, a base-access can be used to invoke the inherited implementation of the function member. 4 If the function member referenced by a base-access is abstract, a compile-time error occurs.
{ JSL }
Jagger Software Ltd
Company # 4070126
VAT # 762 5213 42
Valid HTML 4.01Valid CSS