Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        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;
            }
        }
Ejemplo n.º 4
0
        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);
            }
        }