pascalabcnet/PABCNetHelp/LangGuide/FuncProgramming/Files/Cast.html

16 lines
1.1 KiB
HTML

<html><head><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="Cast">
</object><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><title></title><link rel="StyleSheet" href="../../../default.css"></head>
<body>
<H1>Метод Cast</H1><h2>Описание методов</h2><p>Методы приведены для последовательности <code><b>sequence of</b> T</code>.</p><table>
<tr><td>
<code><b>function </b>Cast&lt;Res&gt;(): <b>sequence of</b> Res;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Преобразовывает элементы объекта System.Collections.IEnumerable в заданный тип.
</td></tr>
</table>
<h2>Пример </h2><blockquote><code><strong>begin</strong><br>&nbsp; <strong>var</strong>
a: <strong>sequence of</strong> integer; <br>&nbsp; <strong>var</strong> b:
<strong>sequence of</strong> real;<br>&nbsp; a := Seq(1,3,5);<br>&nbsp; b :=
a.Cast&amp;&lt;real&gt;();<br><strong>end</strong>.</code></blockquote>
</body>