<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FGenerics%2FIEnumerator</id>
		<title>Csharp/C Sharp/Generics/IEnumerator - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FGenerics%2FIEnumerator"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Generics/IEnumerator&amp;action=history"/>
		<updated>2026-04-29T16:43:21Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/Generics/IEnumerator&amp;diff=1344&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Generics/IEnumerator&amp;diff=1344&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:19Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/Generics/IEnumerator&amp;diff=1345&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Generics/IEnumerator&amp;diff=1345&amp;oldid=prev"/>
				<updated>2010-05-26T11:45:44Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Implement generic IEnumerable and IEnumerator==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Threading;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
public class MyEnumerable&amp;lt;T&amp;gt; : IEnumerable&amp;lt;T&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    public MyEnumerable( T[] items ) {&lt;br /&gt;
        this.items = items;&lt;br /&gt;
    }&lt;br /&gt;
    public IEnumerator&amp;lt;T&amp;gt; GetEnumerator() {&lt;br /&gt;
        return new NestedEnumerator( this );&lt;br /&gt;
    }&lt;br /&gt;
    IEnumerator IEnumerable.GetEnumerator() {&lt;br /&gt;
        return GetEnumerator();&lt;br /&gt;
    }&lt;br /&gt;
    // The enumerator definition.&lt;br /&gt;
    class NestedEnumerator : IEnumerator&amp;lt;T&amp;gt;&lt;br /&gt;
    {&lt;br /&gt;
        public NestedEnumerator( MyEnumerable&amp;lt;T&amp;gt; coll ) {&lt;br /&gt;
            Monitor.Enter( coll.items.SyncRoot );&lt;br /&gt;
            this.index = -1;&lt;br /&gt;
            this.coll = coll;&lt;br /&gt;
        }&lt;br /&gt;
        public T Current {&lt;br /&gt;
            get { return current; }&lt;br /&gt;
        }&lt;br /&gt;
        object IEnumerator.Current {&lt;br /&gt;
            get { return Current; }&lt;br /&gt;
        }&lt;br /&gt;
        public bool MoveNext() {&lt;br /&gt;
            if( ++index &amp;gt;= coll.items.Length ) {&lt;br /&gt;
                return false;&lt;br /&gt;
            } else {&lt;br /&gt;
                current = coll.items[index];&lt;br /&gt;
                return true;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        public void Reset() {&lt;br /&gt;
            current = default(T);&lt;br /&gt;
            index = 0;&lt;br /&gt;
        }&lt;br /&gt;
        public void Dispose() {&lt;br /&gt;
            try {&lt;br /&gt;
                current = default(T);&lt;br /&gt;
                index = coll.items.Length;&lt;br /&gt;
            }&lt;br /&gt;
            finally {&lt;br /&gt;
                Monitor.Exit( coll.items.SyncRoot );&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        private MyEnumerable&amp;lt;T&amp;gt; coll;&lt;br /&gt;
        private T current;&lt;br /&gt;
        private int index;&lt;br /&gt;
    }&lt;br /&gt;
    private T[] items;&lt;br /&gt;
}&lt;br /&gt;
public class EntryPoint&lt;br /&gt;
{&lt;br /&gt;
    static void Main() {&lt;br /&gt;
        MyEnumerable&amp;lt;int&amp;gt; integers = new MyEnumerable&amp;lt;int&amp;gt;( new int[] {1, 2, 3, 4} );&lt;br /&gt;
        foreach( int n in integers ) {&lt;br /&gt;
            Console.WriteLine( n );&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>