示例#1
0
            static void Main(string[] args)
            {
                Bead a1 = new Bead('L');//create list
                Bead b  = new Bead('M', a1);
                Bead c  = new Bead('S', b);
                Bead d  = new Bead('M', c);
                Bead e  = new Bead('M', d);
                Bead e2 = new Bead('M', e);

                Console.WriteLine(e2);

                /*Bead add = new Bead(new Bead('S', "blue", new Bead('M', "green", new Bead('L', "yellow"))));
                 * IntNode a = new IntNode(2, new IntNode(3, new IntNode(5)));
                 * AddNodeA(a,5);
                 * Console.WriteLine(a);
                 * a= AddNode(a, 4);
                 * Console.WriteLine(LenNodeR(a));
                 * Console.WriteLine(a);
                 * IntNode p = DelNode(a);
                 * Console.WriteLine(p);
                 * Console.WriteLine(a);
                 * Console.WriteLine(LenNode(p));*/
            }
示例#2
0
 public Bead(char size, string color)
 {
     this.size  = size;
     this.color = color;
     this.next  = null;
 }
示例#3
0
 public void SetNextBead(Bead bead)
 {
     this.next = bead;
 }
示例#4
0
 public Bead(Bead bead)
 {
     this.size  = bead.GetSize();
     this.color = bead.GetColor();
     this.next  = bead.GetNextBead();
 }
示例#5
0
 public Bead(char size, Bead bead)
 {
     this.size = size;
     this.next = bead;
 }
示例#6
0
 public Bead(char size)
 {
     this.size = size;
     this.next = null;
 }
示例#7
0
 public Bead(char size, string color, Bead bead)
 {
     this.size  = size;
     this.color = color;
     this.next  = bead;
 }