Is it possible to use a foreach to make new objects inside an IEnumberable? : Using *xunit* I want to pass a list of strings to a test (using ClassData or MemberData)  Is there a way to do something like this but with a list:

**before:**

    public static IEnumerable<object[]> GetPersonFromDataGenerator()
    {
        yield return new object[]
        {
            new Person {"Tribbiani"},
            new Person {"Gotti"},
            new Person {"Sopranos"},
            new Person {"Corleone"}
        };
    }
**after:**

    public static IEnumerable<object[]> GetPersonFromDataGenerator()
    {
        var listOfPersons = GetList();
        yield return new object[]
        {
            foreach(var p in listOfPersons)
            {
                 new Person {p}
            } 
        };
    }

