using System; using System.Collections.Generic; using System.Text; namespace Aspose.HTML.Tutorial { public static class AsposeHelper { public static string ToDefintionList( this Dictionary source) { var sb = new StringBuilder("
"); foreach (var key in source.Keys) { sb.Append("
"); sb.Append(key); sb.Append("
"); sb.Append(source[key]); sb.Append("
"); } return sb.ToString(); } } class Program { static void Main(string[] args) { var computerTerms = new Dictionary { { "RAM", "Random Access Memory" }, { "ROM", "Read-Only Memory" } }; Console.WriteLine(computerTerms.ToDefintionList()); } } }