public double InvoiceTotal(InvoiceDetail[] items) { double total = 0; foreach (var i in items) { total += i.DblLineTotal; } return total; }
//general purpose constructor public ReceivableInvoice(InvoiceDetail[] items) : base(items) { }
//general purpose constructor public OutgoingInvoice(InvoiceDetail[] items) : base(items) { }
//general purpose constructor public Invoice(InvoiceDetail[] items) { InvoiceNumber = sequence_id++; InvoiceItems = items; }
//copy constructor public InvoiceDetail(InvoiceDetail i) : this(i.DblLineTotal) { }