struct order
{
public string itemName;
public int unitCount;
public double unitCost;
public double totalPrice()
{
double ttl = unitCount * unitCost;
return ttl;
}
public string OrderDetails()
{
return string.Format("Order Information: {0} {1} items at ${2} each,"
+ "total cost ${3}", unitCount, itemName, unitCost, totalPrice());
}
}
|