Пример #1
0
        static void Main(string[] args)
        {
            var serializer = new DataContractSerializer(typeof(Effect));

            var testEffect = new Effect();

            var testAdvantStat = new OptionalAdvantageStatLine("Test", 1, 2, 3, 4, 5);
            var testAdvantage  = new OptionalAdvantage("I'm Optional", testAdvantStat);

            testEffect.AddAdvantage(testAdvantage);



            using (FileStream writer = new FileStream("Test.xml", FileMode.Create))
            {
                serializer.WriteObject(writer, testEffect);
            }
        }