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

17 lines
1 KiB
HTML

<html><head><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="AsEnumerable">
</object><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><title></title><link rel="StyleSheet" href="../../../default.css"></head>
<body>
<H1>Ìåòîä AsEnumerable</H1><h2>Îïèñàíèå ìåòîäîâ</h2><p>Ìåòîäû ïðèâåäåíû äëÿ ïîñëåäîâàòåëüíîñòè <code><b>sequence of</b> T</code>.</p><table>
<tr><td>
<code><b>function </b>AsEnumerable(): <b>sequence of</b> T;</code>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò âõîäíûå äàííûå, ïðèâåäåííûå ê òèïó IEnumerable<T>.
</td></tr>
</table>
<h2>Ïðèìåð </h2><blockquote><code><strong>function</strong> Print&lt;T&gt;(Self:
<strong>array of</strong> T): <strong>array of</strong> T; extensionmethod;<br>
<strong>begin</strong><br>&nbsp; Self.AsEnumerable.Print; <br>&nbsp; Result
:= Self;<br><strong>end</strong>;<br><br><strong>begin</strong><br>&nbsp;
Arr(1,2,3).Print<br><strong>end</strong>.</code></blockquote>
</body>