public string ToString_WithOthersFormatString(string format) { Customer customer = new Customer("Jeffrey Richter", "+1 (425) 555-0100", 1000000); Stopwatch watch = new Stopwatch(); string actResultString = customer.ToString(format); return actResultString; }
private string FormatCustomerWithDoubleQuote(Customer customer) { return String.Format("Name: \"{0}\" ContactPhone: \"{1}\" Revenue: \"{2}\"", customer.Name, customer.ContactPhone, customer.Revenue); }
private string FormatCustomerWithSingleQuote(Customer customer) { return String.Format("Name: '{0}' ContactPhone: '{1}' Revenue: '{2}'", customer.Name, customer.ContactPhone, customer.Revenue); }
private string FormatCustomerWithNewLine(Customer customer) { return String.Format("Name: {0}\n ContactPhone: {1}\n Revenue: {2}\n", customer.Name, customer.ContactPhone, customer.Revenue); }
private string FormatCustomerWithTab(Customer customer) { return String.Format("Name: {0}\t ContactPhone: {1}\t Revenue: {2}\t", customer.Name, customer.ContactPhone, customer.Revenue); }