public void GetEnumeratorEx()
{
//ExStart
//ExFor:VariableCollection.GetEnumerator
//ExSummary:Shows how to obtain an enumerator from a collection of document variables and use it.
Document doc = new Document(MyDir + "Document.doc");
doc.Variables.Add("doc", "Word processing document");
doc.Variables.Add("docx", "Word processing document");
doc.Variables.Add("txt", "Plain text file");
doc.Variables.Add("bmp", "Image");
doc.Variables.Add("png", "Image");
var enumerator = doc.Variables.GetEnumerator();
while (enumerator.MoveNext())
{
DictionaryEntry de = (DictionaryEntry)enumerator.Current;
Console.WriteLine("Name: {0}, Value: {1}", de.Key, de.Value);
}
//ExEnd
}