private static IEnumerable<NameObj> ProcessListB() { int count = 0; foreach (string nameB in _namesB) { NameObj personFromListB = new NameObj() { OldName = nameB, NewName = "- " + nameB + " = " + count++.ToString() }; yield return personFromListB; } }
private static IEnumerable <NameObj> ProcessListB() { int count = 0; foreach (string nameB in _namesB) { NameObj personFromListB = new NameObj() { OldName = nameB, NewName = "- " + nameB + " = " + count++.ToString() }; yield return(personFromListB); } }
private static IEnumerable<NameObj> ProcessListA() { int count = 0; foreach (string nameA in _namesA) { string nameB = String.Empty; foreach (NameObj personFromListB in ProcessListB()) { nameB = personFromListB.NewName; yield return personFromListB; } NameObj personFromListA = new NameObj() { OldName = nameA, NewName = nameA + " = " + count++.ToString() }; yield return personFromListA; } }
private static IEnumerable <NameObj> ProcessListA() { int count = 0; foreach (string nameA in _namesA) { string nameB = String.Empty; foreach (NameObj personFromListB in ProcessListB()) { nameB = personFromListB.NewName; yield return(personFromListB); } NameObj personFromListA = new NameObj() { OldName = nameA, NewName = nameA + " = " + count++.ToString() }; yield return(personFromListA); } }