コード例 #1
0
 public int LineCount()
 {
     return(LineItems.Count());
 }
コード例 #2
0
 /// <summary>
 /// Outputs string containing the following (replace [] with actual values):
 /// Invoice Number: [InvoiceNumber], InvoiceDate: [DD/MM/YYYY], LineItemCount: [Number of items in LineItems]
 /// </summary>
 public override string ToString()
 {
     return($"Invoice Number: {InvoiceNumber}, InvoiceDate: {(InvoiceDate == DateTime.MinValue ? string.Empty : InvoiceDate.ToString("dd/MM/yyyy")) }, LineItemCount: {LineItems.Count()}");
 }