using System; class Hello { static void Main() { Console.WriteLine("Hello, world"); Console.ReadLine(); } } 这个是最简单的下面这个是链表public class Node{ private object Element; public Node Link; public Node() { Element = null; Link = null; } public Node(object theElement) { Element = theElement; Link = null; } public void AddNode(object theElement) { Link = new Node(theElement); } public void AddNode(Node n) { Link = n; } public override string ToString() { return Element.ToString(); }}public class LinkedList{ public Node header; private Node current; public LinkedList() { header = new Node("header"); current = header; } public void Add(Node n) { current.AddNode(n); current = current.Link; } public void Add(object obj) { current.AddNode(obj); current = current.Link; }}这个是堆栈using System;using System.Collections ;namespace 栈的进入和弹出{ ///
标签:示例