Suppose you create a Box class with some properties.

  1.  
  2. class Box
  3. {
  4.    public string Name
  5.    { get; set; }
  6.  
  7.    public string Color
  8.    { get; set; }
  9.  
  10.    public string Label
  11.    { get; set; }
  12.  
  13.    public DateTime CreatedAt
  14.    { get; set; }
  15.  
  16.    public override string ToString()
  17.    {
  18.      return string.Format("[Name: {0}; Color: {1}; Label: {2}; CreatedAt: {3}]",
  19.                           Name, Color, Label, CreatedAt);
  20.    }
  21. }

More

Rating 4.00 out of 5
[?]