using System.Collections.Generic;
using YamlDotNet.Serialization;
namespace YamlDotNet.Samples
public class SerializeObjectGraph
street = "123 Tornado Alley\nSuite 16",
receipt = "Oz-Ware Purchase Invoice",
date = new DateTime(2007, 8, 6),
descrip = "Water Bucket (Filled)",
descrip = "High Heeled \"Ruby\" Slippers",
specialDelivery = "Follow the Yellow Brick\n" +
"Road to the Emerald City.\n" +
"Pay no attention to the\n" +
"man behind the curtain."
var serializer = new Serializer();
serializer.Serialize(Console.Out, receipt);