I was just reading Mike Stall's blog Fun with yield, generics, foreach . He discusses using enumeration with yield and generics. The example he uses is a heterogenous array object[] list = new object[] {1,2, "abc", 5f, "def" } ; and he needs to print