blob: f4e4f7b95894b603333da5c02c9a7044d9b735e7 (
plain)
1
2
3
4
5
|
<?xml version="1.0"?>
<clause number="14.4.3.1" title="Invocations on boxed instances">
<paragraph>A function member implemented in a <non_terminal where="11.1">value-type</non_terminal> can be invoked through a boxed instance of that <non_terminal where="11.1">value-type</non_terminal> in the following situations: <list><list_item> When the function member is an override of a method inherited from type object and is invoked through an instance expression of type object. </list_item><list_item> When the function member is an implementation of an interface function member and is invoked through an instance expression of an <non_terminal where="11.2">interface-type</non_terminal>. </list_item><list_item> When the function member is invoked through a delegate. </list_item></list></paragraph>
<paragraph>In these situations, the boxed instance is considered to contain a variable of the <non_terminal where="11.1">value-type</non_terminal>, and this variable becomes the variable referenced by this within the function member invocation. <note>[Note: In particular, this means that when a function member is invoked on a boxed instance, it is possible for the function member to modify the value contained in the boxed instance. end note]</note> </paragraph>
</clause>
|