Suppose you create a Box class with some properties.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class Box
{
   public string Name
   { get; set; }

   public string Color
   { get; set; }

   public string Label
   { get; set; }

   public DateTime CreatedAt
   { get; set; }

   public override string ToString()
   {
     return string.Format("[Name: {0}; Color: {1}; Label: {2}; CreatedAt: {3}]",
                          Name, Color, Label, CreatedAt);
   }
}

More

Rating 4.00 out of 5
[?]