public void Scan(string[] ProductNames) { foreach (var productName in ProductNames) { ScannedProducts.Add((Product)registeredProducts.First(p => p.ProductName == productName).Clone()); } }
public void Scan(string ProductName) { ScannedProducts.Add((Product)registeredProducts.First(p => p.ProductName == ProductName).Clone()); }