⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 14.4.1.htm

📁 This ECMA Standard specifies the form and establishes the interpretation of programs written in the
💻 HTM
📖 第 1 页 / 共 2 页
字号:
class Test  
{  
   static void F(ref object x) {...}  
   static void Main() {  
      object[] a = new object[10];  
      object[] b = new string[10];  
      F(ref a[0]);    // Ok  
      F(ref b[1]);   // ArrayTypeMismatchException  
   }  
}  
</pre>the second invocation of F causes a System.ArrayTypeMismatchException to be thrown because the actual element type of b is string and not object. end example]</span> </span><span class="locator">
     Paragraph 9</span><span class="paragraph"><span class="sentence"><span class="sentence-number">1</span> <a name="P9S1"></a>When a function member with a parameter array is invoked in its expanded form, the invocation is processed exactly as if an array creation expression with an array initializer (<a href="14.5.10.2.htm">&#167;14.5.10.2</a>) was inserted around the expanded parameters.</span> <span class="example">[Example: For example, given the declaration <pre class="code-example">
void F(int x, int y, params object[] args);  
</pre>the following invocations of the expanded form of the method <pre class="code-example">
F(10, 20);  
F(10, 20, 30, 40);  
F(10, 20, 1, "hello", 3.0);  
</pre>correspond exactly to <pre class="code-example">
F(10, 20, new object[] {});  
F(10, 20, new object[] {30, 40});  
F(10, 20, new object[] {1, "hello", 3.0});  
</pre>end example]</span> <span class="sentence"><span class="sentence-number">2</span> <a name="P9S2"></a>In particular, note that an empty array is created when there are zero arguments given for the parameter array.</span> </span><span class="ruler"></span><table><tr><td><table align="left" bgcolor="navy"><tr bgcolor="navy"><td><font face="Arial,sans-serif" size="6" color="yellow"><strong>{ JSL }</strong></font></td></tr></table></td></tr><tr><td><font face="Arial,sans-serif" size="2" color="navy"><strong>Jagger Software Ltd</strong></font></td></tr><tr><td><font face="Arial,sans-serif" size="2" color="navy"><strong>Company # 4070126</strong></font></td></tr><tr><td><font face="Arial,sans-serif" size="2" color="navy"><strong>VAT # 762 5213 42</strong></font></td></tr></table><img src="valid-html401.png" align="left" height="31" width="88" alt="Valid HTML 4.01" /><img src="vcss.gif" align="left" height="31" width="88" alt="Valid CSS" /></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -