using System;
using System.Collections.Generic;

class Program
{
    static void Main(string[] args)
    {
        IEnumerable<Inter1> ienum1 = new Class1[] { new Class1() };
        foreach (Class2 c in ienum1)
        {
            Console.WriteLine(c);
        }
    }
}

public interface Inter1 { }
public class Class1 : Inter1 { }
public class Class2 { }