using System;
using System.Text;
namespace OrdersParser{
/// <summary>
/// Describes a single ordered item.
/// </summary>
public class Item
{
private int id;
private string name;
private decimal qty;
public Item()
{
}
public int Id
{
get { return id; }
set { id = value; }
}
public string Name
{
get { return name; }
set { name = value; }
}
public decimal Qty
{
get { return qty; }
set { qty = value; }
}
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append(" Item #")
.Append(id)
.Append(" ")
.Append(name)
.Append(" ")
.Append(qty);
return sb.ToString();
}
}
}
|