Ejemplo n.º 1
0
        public static IEnumerable <string> LinesFromFile(string filePath)
        {
            string rawText = GenFile.TextFromResourceFile(filePath);

            foreach (string line in GenText.LinesFromString(rawText))
            {
                yield return(line);
            }
        }
Ejemplo n.º 2
0
        public static IEnumerable <string> LinesFromFile(string filePath)
        {
            string rawText = GenFile.TextFromResourceFile(filePath);

            using (IEnumerator <string> enumerator = GenText.LinesFromString(rawText).GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    string line = enumerator.Current;
                    yield return(line);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            yield break;
IL_00ca:
            /*Error near IL_00cb: Unexpected return in MoveNext()*/;
        }