public override void Add(Component component)
 {
     if (component is Computer)
     {
         throw new Exception("Computer can only be top most object.");
     }
     _components.Add(component);
 }
Esempio n. 2
0
 public virtual void Add(Component component)
 {
     throw new Exception("Component cannot be added to this component.");
 }