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));*/ }
public Bead(char size, string color) { this.size = size; this.color = color; this.next = null; }
public void SetNextBead(Bead bead) { this.next = bead; }
public Bead(Bead bead) { this.size = bead.GetSize(); this.color = bead.GetColor(); this.next = bead.GetNextBead(); }
public Bead(char size, Bead bead) { this.size = size; this.next = bead; }
public Bead(char size) { this.size = size; this.next = null; }
public Bead(char size, string color, Bead bead) { this.size = size; this.color = color; this.next = bead; }