using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

// Add a reference to System.Runtime.Serialization.
using System.Runtime.Serialization;

namespace JsonSerialization
{
    [Serializable]
    public class Order
    {
        [DataMember] public string Description;
        [DataMember] public int Quantity;
        [DataMember] public decimal Price;

        // Return a textual representation of the order.
        public override string ToString()
        {
            decimal total = Quantity * Price;
            return Description + ": " +
                Quantity.ToString() + " @ " +
                Price.ToString("C") + " = " +
                total.ToString("C");
        }
    }
}
