Cómo serializar un diccionario en XML
He podido serializar un IEnumerable de esta manera:
[XmlArray("TRANSACTIONS")]
[XmlArrayItem("TRANSACTION", typeof(Record))]
public IEnumerable<BudgetRecord> Records
{
get
{
foreach(Record br in _budget)
{
yield return br;
}
}
}
Sin embargo, me di cuenta de que ahora necesito un diccionario que contenga una colección.Dictionary<string, RecordCollection>
(RecordCollection implementa IEnumerable).
¿Cómo puedo lograr eso?