private static void DoStuff(IComputerPartVisitor visitor) { IComputerPart[,] parts = new IComputerPart[, ] { { new Computer(), new Keyboard() }, { new Mouse(), new Computer() } }; foreach (var part in parts) { part.Accept(visitor); } }
public void Remove(IComputerPart item) { throw new System.NotImplementedException(); }
public void Remove(IComputerPart item) { Pieces.Remove(item); }
public void Add(IComputerPart item) { Pieces.Add(item); }