public static void Serialize(InterestRateGenericSwap swap, string filename)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(InterestRateGenericSwap));

            System.IO.TextWriter writer = new System.IO.StreamWriter(filename);
            serializer.Serialize(writer, swap);
            writer.Close();
        }
        public static InterestRateGenericSwap Deserialize(string filename)
        {
            System.IO.StreamReader reader     = new System.IO.StreamReader(filename);
            XmlSerializer          serializer = new XmlSerializer(typeof(InterestRateGenericSwap));

            InterestRateGenericSwap swap = (InterestRateGenericSwap)serializer.Deserialize(reader);

            reader.Close();
            return(swap);
        }