public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Order momment: ");
            sb.AppendLine(Moment.ToString());
            sb.Append("Order Status: ");
            sb.AppendLine(OrderStatus.ToString());
            sb.Append("Client: ");
            sb.Append(Client.Name);
            sb.Append(" (");
            sb.Append(Client.Date);
            sb.Append(")");
            sb.Append(" - ");
            sb.AppendLine(Client.Email);
            sb.AppendLine("Order Intens");

            foreach (OrderItem order in OrderItem)
            {
                sb.Append(order.Product.Name);
                sb.Append(", ");
                sb.Append(order.Price);
                sb.Append(", ");
                sb.Append("Quantity: ");
                sb.Append(order.Quantity);
                sb.Append(", ");
                sb.Append("Subtotal: $");
                sb.AppendLine(order.SubTotal().ToString());
            }

            sb.Append("Total: ");
            sb.AppendLine(Total().ToString());

            return(sb.ToString());
        }
Example #2
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("ORDER SUMMARY: ");
            sb.Append("Order moment: ");
            sb.AppendLine(Moment.ToString("dd/MM/yyyy HH:mm:ss"));
            sb.Append("Order status: ");
            sb.AppendLine(Status.ToString());
            sb.Append("Client: ");
            sb.Append(Client.Name);
            sb.Append(" (");
            sb.Append(Client.BirthDate.ToString("dd/MM/yyyy"));
            sb.Append(") - ");
            sb.AppendLine(Client.Email);
            sb.AppendLine("Order Items:");
            foreach (OrderItem item in Items)
            {
                sb.AppendLine(item.ToString());
            }
            sb.Append("Total price: ");
            sb.AppendLine(Total().ToString("F2", CultureInfo.InvariantCulture));



            return(sb.ToString());
        }
Example #3
0
        public override string ToString()
        {
            StringBuilder summary = new StringBuilder();

            summary.AppendLine("Oder Summary:");
            summary.Append("Order Momment: ");
            summary.AppendLine(Moment.ToString());
            summary.Append("Order Status: ");
            summary.AppendLine(Status.ToString());
            summary.Append("Client: ");
            summary.Append(Buyer.Name);
            summary.Append(" (");
            summary.Append(Buyer.BirthDate.ToString("dd/MM/yyyy"));
            summary.Append(") - ");
            summary.AppendLine(Buyer.Email);
            summary.AppendLine("Items:");
            foreach (OrderItem item in Items)
            {
                summary.AppendLine(item.ToString());
            }
            summary.Append("Total: $");
            summary.Append(Total());

            return(summary.ToString());
        }
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("ORDER SUMMARY");
            sb.Append("Order moment: ");
            sb.AppendLine(Moment.ToString("dd/MM/yyyy HH:mm:ss"));
            sb.Append("Client: ");
            sb.AppendLine(Client.ToString());
            sb.AppendLine("Order items:");

            foreach (OrderItem item in Items)
            {
                sb.Append(item.Product.Name);
                sb.Append(", $");
                sb.Append(item.Product.Price.ToString("F2", CultureInfo.InvariantCulture));
                sb.Append(", Quantity: ");
                sb.Append(item.Quantity);
                sb.Append(", Subtotal: ");
                sb.AppendLine(item.SubTotal().ToString("F2", CultureInfo.InvariantCulture));
            }

            sb.Append("Total price: ");
            sb.AppendLine(Total().ToString("F2", CultureInfo.InvariantCulture));

            return(sb.ToString());
        }
Example #5
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Order moment: ");
            sb.AppendLine(Moment.ToString("dd/MM/yyyy HH:mm:ss"));
            sb.Append("Order status: ");
            sb.AppendLine(Status.ToString());
            sb.Append("Client: ");
            sb.Append(Client.Name);
            sb.Append(" ");
            sb.Append("(" + Client.BirthDate.ToString("dd/MM/yyyy") + ") - ");
            sb.AppendLine(Client.Email);
            sb.AppendLine("Order items:");
            double total = 0;

            foreach (OrderItem p in Items)
            {
                sb.AppendLine(p.Product.Name + ", " + p.Price.ToString("F2") + ", Quantity: " + p.Quantity + ", Subtotal: $" + p.SubTotal(p.Quantity, p.Price).ToString("F2"));
                total += p.SubTotal(p.Quantity, p.Price);
            }

            sb.AppendLine("Total Price: $" + total.ToString("F2"));

            return(sb.ToString());
        }
Example #6
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("ORDER SUMMARY: ");
            sb.Append("Order moment: ");
            sb.AppendLine(Moment.ToString());
            sb.Append("Order status: ");
            sb.AppendLine(Status.ToString());
            sb.Append("Client: ");
            sb.AppendLine(Client.ToString());
            sb.AppendLine("Order items: ");

            foreach (OrderItem item in itens)
            {
                sb.Append(item.product.Name);
                sb.Append(",");
                sb.Append(" $");
                sb.Append(item.product.Price.ToString("F2", CultureInfo.InvariantCulture));
                sb.Append(",");
                sb.Append(" Quantity: ");
                sb.Append(item.Quantity);
                sb.Append(",");
                sb.Append(" Subtotal: $");
                sb.AppendLine(item.subTotal().ToString("F2", CultureInfo.InvariantCulture));
            }

            sb.Append("Total price: $");
            sb.AppendLine(total().ToString("F2", CultureInfo.InvariantCulture));

            return(sb.ToString());
        }
Example #7
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("ORDER SUMMARY");
            sb.Append("Order moment: ");
            sb.AppendLine(Moment.ToString());
            sb.Append("Order Status: ");
            sb.AppendLine(Status.ToString());
            sb.Append("Client: ");
            sb.Append(Client.Name);
            sb.Append(" (");
            sb.Append(Client.BirthDate.ToShortDateString());
            sb.Append(") - ");
            sb.AppendLine(Client.Email);
            sb.AppendLine("Order items: ");
            foreach (OrderItem item in Items)
            {
                sb.Append(item.Product.Name);
                sb.Append(", $");
                sb.Append(item.Price);
                sb.Append(", Quantity: ");
                sb.Append(item.Quantity);
                sb.Append(", Subtotal: $");
                sb.AppendLine(item.SubTotal().ToString());
            }
            sb.Append("Total price: $");
            sb.AppendLine(Total().ToString());

            return(sb.ToString());
        }
        public void Moment_ToStringTest()
        {

            var moment = new Moment(-173.87, Moment.PoundInches);

            moment.ToString().Should().Be("-173.87 lb-in.");
        }
Example #9
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("ORDER SUMMARY");
            sb.Append("Order moment: ");
            sb.AppendLine(Moment.ToString());
            sb.Append("Order status: ");
            sb.AppendLine(Status.ToString());
            sb.Append("Client: ");
            sb.Append(Cliente.Name);
            sb.Append("(" + Cliente.BirthDate.ToString("dd/MM/yyyy") + ") - ");
            sb.AppendLine(Cliente.Email);
            sb.AppendLine("Order items: ");
            foreach (OrderItem item in Itens)
            {
                sb.Append(item.Produto.Name);
                sb.Append(", $ ");
                sb.Append(item.Price.ToString("F2"));
                sb.Append("  Quantity: ");
                sb.Append(item.Quantity.ToString("F3"));
                sb.Append("  Subtotal: $ ");
                sb.AppendLine(item.SubTotal().ToString("F2"));
            }
            sb.Append("TOTAL PRICE: $");
            sb.AppendLine(Total().ToString("F2", CultureInfo.InvariantCulture));
            return(sb.ToString());
        }
Example #10
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("Order moment: " + Moment.ToString("dd/MM/yyyy HH:mm:ss"));
            sb.AppendLine("Order status: " + Status);
            sb.AppendLine("Client: " + Client);
            sb.AppendLine("Order items:");
            foreach (OrderItem oi in Item)
            {
                sb.AppendLine(oi.ToString());
            }
            sb.AppendLine("Total price: $" + Total().ToString("F2", CultureInfo.InvariantCulture));
            return(sb.ToString());

            /*StringBuilder sb = new StringBuilder();
             * sb.Append("Order moment: ");
             * sb.AppendLine(Moment.ToString("dd/MM/yyyy HH:mm:ss"));
             * sb.Append("Order status: ");
             * sb.AppendLine(Status.ToString());
             * sb.Append("Client: ");
             * sb.AppendLine(Client.Name + " (" + Client.BirthDate + ") " + " - " + Client.Email);
             * sb.AppendLine("Order Itens:");
             * foreach(OrderItem oi in Item)
             * {
             *  sb.AppendLine(oi.ToString());
             * }
             * sb.Append("Total price: $");
             * sb.AppendLine(Total().ToString("F2",CultureInfo.InvariantCulture));
             * return sb.ToString();*/
        }
Example #11
0
        public override string ToString()
        {
            StringBuilder product = new StringBuilder();

            product.Append("Order moment: ");
            product.AppendLine(Moment.ToString("dd/mm/yyyy HH:mm:ss"));
            product.Append("Order status: ");
            product.AppendLine(Convert.ToString(Status));
            product.Append("Client: ");
            product.Append(Client.Name);
            product.Append(" ");
            product.Append(Client.Date.ToString("dd/mm/yyyy"));
            product.Append(" - ");
            product.Append(Client.Email);
            product.AppendLine("\nOrder items: ");
            foreach (OrderItem item in Items)
            {
                product.Append(item.Product.Name);
                product.Append(", $");
                product.Append(item.Price.ToString("F2", CultureInfo.InvariantCulture));
                product.Append(", ");
                product.Append("Quantity: ");
                product.Append(item.Quantity);
                product.Append(", ");
                product.Append("Subtotal: $");
                product.AppendLine(item.SubTotal().ToString("F2", CultureInfo.InvariantCulture));
            }
            product.Append("Total price: $");
            product.AppendLine(Total().ToString("F2", CultureInfo.InvariantCulture));
            return(product.ToString());
        }
Example #12
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Order momment :");
            sb.AppendLine(Moment.ToString("dd/MM/yyyy HH:mm:ss"));
            sb.Append("Order status: ");
            sb.AppendLine(Status.ToString());
            sb.Append("Cliente: ");
            sb.AppendLine(Client.Name);
            sb.AppendLine("Order items: ");
            foreach (OrderItem O in OrderItems)
            {
                sb.Append("Produto: ");
                sb.Append(O.Product.Name);
                sb.Append(" , ");
                sb.Append("Price ");
                sb.Append(O.Price);
                sb.Append(" , ");
                sb.Append("Quantity ");
                sb.Append(O.Quantity);
                sb.Append(" , ");
                sb.Append("Subtotal: ");
                sb.Append(O.SubTotal());
                sb.AppendLine();
            }
            return(sb.ToString());
        }
Example #13
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Order Moment: ");
            sb.AppendLine(Moment.ToString("dd/MM/yyyy HH:mm:ss"));
            sb.Append("Order Status: ");
            sb.AppendLine(Status.ToString());
            sb.Append("Client: ");
            sb.Append(Client.Name);
            sb.Append(" (");
            sb.Append(Client.BirthDate.ToString("dd/MM/yyyy"));
            sb.Append(") - ");
            sb.AppendLine(Client.Email);
            sb.AppendLine("Order Itens:");

            foreach (OrderItem item in Items)
            {
                sb.Append(item.Product.Name);
                sb.Append(", ");
                sb.Append(item.Price.ToString("F2", CultureInfo.InvariantCulture));
                sb.Append(", Quantity: ");
                sb.Append(item.Quantity.ToString());
                sb.Append(", Sub Total: ");
                sb.AppendLine(item.SubTotal().ToString("F2", CultureInfo.InvariantCulture));
            }

            sb.Append("Total Price:");
            sb.AppendLine(Total().ToString("F2", CultureInfo.InvariantCulture));

            return(sb.ToString());
        }
Example #14
0
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("Order moment: ");
            builder.AppendLine(Moment.ToString("dd/MM/yyyy HH:mm:ss"));
            builder.Append("Order status: ");
            builder.AppendLine(Status.ToString());
            builder.Append("Client: ");
            builder.Append(Client.Name);
            builder.Append(" (");
            builder.Append(Client.BirthDate.ToString("dd/MM/yyyy"));
            builder.Append(") - ");
            builder.AppendLine(Client.Email);
            builder.AppendLine("Order items:");

            foreach (var item in Items)
            {
                builder.AppendLine(item.ToString());
            }

            builder.Append("Total price: $");
            builder.Append(Total().ToString("F2", CultureInfo.InvariantCulture));

            return(builder.ToString());
        }
Example #15
0
        //Imprimindo na tela
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("\nORDER SUMMARY:");
            sb.Append("Order moment: ");
            sb.AppendLine(Moment.ToString("dd/MM/yyyy HH:mm:ss"));
            sb.Append("Order status: ");
            sb.AppendLine(Status.ToString());

            sb.Append("Client: ");
            sb.Append(Client.Name);
            sb.Append(" (" + Client.BirthDate.ToString("dd/MM/yyyy") + ") - ");
            sb.AppendLine(Client.Email);
            sb.AppendLine("Order items: ");

            foreach (OrderItem item in Items)
            {
                sb.Append(item.Product.Name);
                sb.Append(", $" + item.Price.ToString("f2", CultureInfo.InvariantCulture));
                sb.Append(", Quantity: " + item.Quantity);
                sb.AppendLine(", subtotal: " + item.SubTotal().ToString("f2", CultureInfo.InvariantCulture));
            }

            sb.Append("Total price: ");
            sb.Append("$");
            sb.Append(Total().ToString("f2", CultureInfo.InvariantCulture));

            return(sb.ToString());
        }
Example #16
0
        public override string ToString()
        {
            StringBuilder x = new StringBuilder();

            x.AppendLine("ORDER SUMMARY:");
            x.Append("Order moment:");
            x.AppendLine(Moment.ToString("dd/MM/yyyy HH:mm:ss"));
            x.Append("Order status: ");
            x.AppendLine(Status.ToString());
            x.Append("Client: ");
            x.Append(Client.Name);
            x.Append(" (");
            x.Append(Client.BirtDate.Date);
            x.Append(") - ");
            x.AppendLine(Client.Email);
            x.AppendLine("ORDER SUMMARY");
            foreach (OrderItem i in Items)
            {
                x.Append(i.Product.Name);
                x.Append(", ");
                x.Append(i.Price.ToString("F2", CultureInfo.InvariantCulture));
                x.Append(", Quantity: ");
                x.Append(i.Quantity);
                x.Append(", Subtotal: $");
                x.AppendLine(i.subTotal().ToString());
            }
            x.Append("Total price: $");
            x.AppendLine(Total().ToString("F2", CultureInfo.InvariantCulture));

            return(x.ToString());
        }
Example #17
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Order Moment: ");
            sb.AppendLine(Moment.ToString("dd/MM/yyyy HH:mm:ss"));
            sb.Append("Client: ");
            sb.Append(Client.Name);
            sb.Append($"({Client.BirthDate.ToString("dd/MM/yyyy")}) - ");
            sb.AppendLine(Client.Email);
            sb.AppendLine("Order items: ");
            foreach (OrderItem item in Items)
            {
                sb.Append(item.Product.Name);
                sb.Append($", ${item.Product.Price.ToString("F2")}");
                sb.Append(", Quantity: ");
                sb.Append(item.Quantity);
                sb.Append(", Subtotal: ");
                sb.AppendLine($"${item.SubTotal().ToString("F2")}");
            }
            sb.Append("Total price: ");
            sb.Append($"${Total().ToString("F2")}");

            return(sb.ToString());
        }
Example #18
0
 public override string ToString()
 {
     return(Id
            + ", "
            + Moment.ToString("dd/MM/yyyy")
            + ", "
            + Status);
 }
Example #19
0
        public void ClampTest()
        {
            var m = new Moment(DateTime.Now);

            m.Clamp(m, m).Should().Be(m);
            m.Clamp(m + TimeSpan.FromSeconds(1), DateTime.MaxValue)
            .Should().Be(m + TimeSpan.FromSeconds(1));
            m.Clamp(DateTime.MinValue, m - TimeSpan.FromSeconds(1))
            .Should().Be(m - TimeSpan.FromSeconds(1));

            m = Moment.MinValue;
            m.ToDateTimeClamped().Should().Be(DateTime.MinValue.ToUniversalTime());
            m.ToDateTimeOffsetClamped().Should().Be(DateTimeOffset.MinValue.ToUniversalTime());
            m.ToString().Should().Be(new Moment(DateTime.MinValue).ToString());
            m = Moment.MaxValue;
            m.ToDateTimeClamped().Should().Be(DateTime.MaxValue.ToUniversalTime());
            m.ToDateTimeOffsetClamped().Should().Be(DateTimeOffset.MaxValue.ToUniversalTime());
            m.ToString().Should().Be(new Moment(DateTimeOffset.MaxValue).ToString());
        }
Example #20
0
        public override string ToString()
        {
            string text = Title + "\n" + Likes + " likes - " + Moment.ToString("dd/MM/yyyy HH:mm:ss") + "\n" + Content + "\n" + "Comments:\n";

            foreach (Comment c in Comments)
            {
                text += c.Text + "\n";
            }
            return(text);
        }
Example #21
0
        private void PrintLagna(PrintPageEventArgs e)
        {
            e.HasMorePages = true;
            Graphics g = e.Graphics;

            g.ResetTransform();
            g.TranslateTransform(100, header_offset);

            for (int j = 1; j <= 12; j++)
            {
                ZodiacHouse zh = new ZodiacHouse((ZodiacHouse.Name)j);
                g.DrawString(zh.value.ToString(), f, b,
                             day_offset + 100 + (int)zh.value * time_width, 0);
            }
            g.TranslateTransform(0, f.Height);

            int i = local_index;

            while (i < locals.Count)
            {
                PanchangaLocalMoments local = (PanchangaLocalMoments)locals[i];
                Moment m_sunrise            = new Moment(local.sunrise_ut, h);
                g.DrawString(m_sunrise.ToString(), f, b, day_offset, 0);

                for (int j = 0; j < local.lagnas_ut.Count; j++)
                {
                    PanchangaMomentInfo pmi = (PanchangaMomentInfo)local.lagnas_ut[j];
                    //Moment m_lagna = new Moment(pmi.ut, h);
                    ZodiacHouse zh = new ZodiacHouse((ZodiacHouse.Name)pmi.info);
                    zh = zh.add(12);
                    Font _f = f;

                    if (local.lagna_zh == zh.value)
                    {
                        _f = this.f_u;
                    }

                    g.DrawString(
                        this.utTimeToString(pmi.ut, local.sunrise_ut, local.sunrise),
                        _f, b,
                        day_offset + 100 + (int)zh.value * time_width, 0);
                }

                local_index = ++i;
                g.TranslateTransform(0, f.Height);
                if (g.Transform.OffsetY > e.PageBounds.Height - this.header_offset)
                {
                    return;
                }
            }

            this.bPrintLagna = false;
            e.HasMorePages   = false;
        }
Example #22
0
        public void ToStringTest()
        {
            // arrange
            Moment time = new Moment(5, 22, 53);

            // act
            string toStringResult         = time.ToString();
            string expectedToStringResult = "05:22:53";

            // assert
            Assert.AreEqual(toStringResult, expectedToStringResult);
        }
Example #23
0
        //------------------------------------------

        public override string ToString()
        {
            Console.Write("\nORDER SUMARY:\n" +
                          $"Order moment: {Moment.ToString("dd/MM/yyyy HH:mm:ss")}\n" +
                          $"Order Status: {Status}\n" +
                          $"Client: {client.Name} ({client.BirthDate.ToString("dd/MM/yyyy")}) - {client.Email}\n" +
                          $"Order items:\n");
            foreach (OrderItem item in orderItems)
            {
                Console.Write($"{item.Product.Name}, ${item.Product.Price.ToString("F2",CultureInfo.InvariantCulture)}, Quantity: {item.Quantity}, Subtotal: ${item.SubTotal().ToString("F2",CultureInfo.InvariantCulture)}\n");
            }
            return($"Total price: ${Total().ToString("F2", CultureInfo.InvariantCulture)})");
        }
Example #24
0
 public override string ToString()
 {
     StringBuilder sb = new StringBuilder();
     sb.AppendLine("Order moment: " + Moment.ToString("dd/MM/yyyy HH:mm:ss"));
     sb.AppendLine("Order status: " + Status);
     sb.AppendLine("Client: " + Client);
     sb.AppendLine("Order Items:");
     foreach(OrderItem item in Items)
     {
         sb.AppendLine(item.ToString());
     }
     sb.AppendLine("Total price: " + Total().ToString("F2", CultureInfo.InvariantCulture));
     return sb.ToString();
 }
Example #25
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine(Title);
            sb.AppendLine($"{Likes} Likes - {Moment.ToString("dd/MM/yyyy HH:mm:ss")}");
            sb.AppendLine(Content);
            sb.AppendLine("Comments:");
            foreach (Comment comment in Comments)
            {
                sb.AppendLine(comment.Text);
            }
            return(sb.ToString());
        }
Example #26
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine($"Order moment: {Moment.ToString("dd/MM/yyyy HH:mm:ss")}");
            sb.AppendLine($"Order status: {Status}");
            sb.AppendLine($"Client: {Client}");
            sb.AppendLine($"Order items:");
            foreach (OrderItem item in Items)
            {
                sb.AppendLine(item.ToString());
            }
            sb.AppendLine($"Total price: ${Total().ToString("F2", CultureInfo.InvariantCulture)}");
            return(sb.ToString());
        }
Example #27
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("Order moment: " + Moment.ToString("dd/MM/yyyy HH:mm:ss"));
            sb.AppendLine("Order status: " + Status);
            sb.AppendLine("Client: " + Client.Name + " (" + Client.BirthDate + ") - " + Client.Email);
            sb.AppendLine("Order items:");
            foreach (OrderItem item in Itens)
            {
                sb.AppendLine(item.ToString());
            }

            return(sb.ToString());
        }
Example #28
0
        public override string ToString()
        {
            StringBuilder result = new StringBuilder();

            result.AppendLine($"Ordered at: {Moment.ToString("dd/MM/yyyy HH:mm")}");
            result.AppendLine($"Order Status: {Status}");
            result.AppendLine($"Client: {Client}");
            result.AppendLine("Items ordered: ");
            foreach (OrderItem item in OrderItem)
            {
                result.AppendLine(item.ToString());
            }
            result.AppendLine($"Total Price: {Total().ToString("F2")}");
            return(result.ToString());
        }
Example #29
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine($"Order moment: " + Moment.ToString("dd/MM/yyyy HH:mm:ss"));
            sb.AppendLine($"Order status: {Status}");
            sb.AppendLine("Client: " + Client);
            sb.AppendLine("Order Items: ");
            foreach (OrderItem item in Items)
            {
                sb.AppendLine(item.ToString());
            }
            sb.AppendLine("Total price: $" + Total());
            return(sb.ToString());
        }
Example #30
0
        public override string ToString()
        {
            StringBuilder ss = new StringBuilder();

            ss.AppendLine("Order Moment: " + Moment.ToString("yyyy / MM / dd HH: mm:ss"));
            ss.AppendLine("Order Status: " + Status);
            ss.AppendLine("Client: " + Client);
            ss.AppendLine("Order items: ");
            foreach (OrderItem item in OrderItem)
            {
                ss.AppendLine(item.ToString());
            }
            ss.AppendLine("Total price: $" + Total());
            return(ss.ToString());
        }
Example #31
0
 public override string ToString()
 {
     StringBuilder sb = new StringBuilder();
     sb.AppendLine(Title);
     sb.Append(Likes);
     sb.Append(" Likes - ");
     sb.AppendLine(Moment.ToString("dd/MM/yyyy HH:mm:ss"));
     sb.AppendLine(Content);
     sb.AppendLine("Comments");
     foreach (var item in Comments)
     {
         sb.AppendLine(item.Text);
     }
     return sb.ToString();
 }