using System; using MSG = System.Collections.Generic; public class HashSet { long value; public HashSet (long value) { this.value = value; } public void Test () { Console.WriteLine (value); } public MSG.IEnumerator GetEnumerator() { Test (); yield break; } } class X { static void Main () { HashSet hb = new HashSet (12345678); foreach (int value in hb) Console.WriteLine (value); } }