<?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%2FCollections_Data_Structure%2FYour_LinkedList</id>
		<title>Csharp/C Sharp/Collections Data Structure/Your LinkedList - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FCollections_Data_Structure%2FYour_LinkedList"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Collections_Data_Structure/Your_LinkedList&amp;action=history"/>
		<updated>2026-04-30T01:05:40Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/Collections_Data_Structure/Your_LinkedList&amp;diff=630&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/Collections_Data_Structure/Your_LinkedList&amp;diff=630&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:18Z</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/Collections_Data_Structure/Your_LinkedList&amp;diff=631&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Collections_Data_Structure/Your_LinkedList&amp;diff=631&amp;oldid=prev"/>
				<updated>2010-05-26T11:39:15Z</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;==Implements the LinkedList data structure==&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;
class Node {&lt;br /&gt;
  internal Object data;&lt;br /&gt;
  internal Node next;&lt;br /&gt;
 &lt;br /&gt;
  public Node(Object o, Node n){&lt;br /&gt;
    data = o;&lt;br /&gt;
    next = n;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
public class LinkedList {&lt;br /&gt;
  private Node head;&lt;br /&gt;
  private Node previous;&lt;br /&gt;
  private Node current;&lt;br /&gt;
  &lt;br /&gt;
  public LinkedList() {&lt;br /&gt;
    head = null;&lt;br /&gt;
    previous = null;&lt;br /&gt;
    current = null;&lt;br /&gt;
  }&lt;br /&gt;
  public bool IsEmpty() {&lt;br /&gt;
    return head == null;&lt;br /&gt;
  }&lt;br /&gt;
  public void Insert(Object o) {&lt;br /&gt;
    Node n = new Node(o,current);&lt;br /&gt;
    if (previous == null)&lt;br /&gt;
      head = n;&lt;br /&gt;
    else &lt;br /&gt;
      previous.next = n;&lt;br /&gt;
    current = n;&lt;br /&gt;
  }&lt;br /&gt;
  public void Remove() {&lt;br /&gt;
    if (head != null){&lt;br /&gt;
      if (previous == null)&lt;br /&gt;
        head = head.next;&lt;br /&gt;
      else &lt;br /&gt;
        previous.next = current.next;&lt;br /&gt;
      current = current.next;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  public Object GetData(){&lt;br /&gt;
    if (current != null) &lt;br /&gt;
      return current.data;&lt;br /&gt;
    return null;&lt;br /&gt;
  }&lt;br /&gt;
  public bool AtEnd() {&lt;br /&gt;
    return current == null;&lt;br /&gt;
  }&lt;br /&gt;
  public void Advance(){&lt;br /&gt;
    if (!AtEnd()){&lt;br /&gt;
      previous = current;&lt;br /&gt;
      current = current .next;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  public void Reset() {&lt;br /&gt;
    previous = null;&lt;br /&gt;
    current = head;&lt;br /&gt;
  }&lt;br /&gt;
  public void Display() {&lt;br /&gt;
    Reset();&lt;br /&gt;
    if (head != null) &lt;br /&gt;
      do {&lt;br /&gt;
        Console.WriteLine(&amp;quot;   {0}&amp;quot;, GetData());&lt;br /&gt;
        Advance();&lt;br /&gt;
      }while (!AtEnd());&lt;br /&gt;
  }    &lt;br /&gt;
  public static void Main() {&lt;br /&gt;
    LinkedList list = new LinkedList();&lt;br /&gt;
    Console.WriteLine(&amp;quot;Is Empty {0}&amp;quot;,list.IsEmpty());&lt;br /&gt;
    list.Insert(&amp;quot;A&amp;quot;);&lt;br /&gt;
    list.Insert(&amp;quot;B&amp;quot;);&lt;br /&gt;
    list.Insert(&amp;quot;C&amp;quot;);&lt;br /&gt;
    Console.WriteLine(&amp;quot;The original list is:&amp;quot;);&lt;br /&gt;
    list.Display();&lt;br /&gt;
    list.Reset();&lt;br /&gt;
    list.Advance();&lt;br /&gt;
    Console.WriteLine(&amp;quot;The current element is {0}&amp;quot;,list.GetData());&lt;br /&gt;
    list.Remove();&lt;br /&gt;
    list.Display();&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>