You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
769 B

2 years ago
using Iterator.Collections;
namespace Iterator
{
internal class Program
{
static void Main(string[] args)
{
WordsCollection collection = new WordsCollection();
collection.AddItem("First");
collection.AddItem("Second");
collection.AddItem("Third");
Console.WriteLine("Straight traversal: ");
foreach (var element in collection)
{
Console.WriteLine(element);
}
Console.WriteLine();
Console.WriteLine("Reverse traversal: ");
collection.ReverseDirection();
foreach (var element in collection)
{
Console.WriteLine(element);
}
}
}
}