using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace desktopEnglish.utils
{
    class ReadWord
    {
        public static List<string> getAllWord(string path)
        {
            List<string> wordList = new List<string>();
            if (!File.Exists(path))
            {
                wordList.Add("sky");
                return wordList;
            }
            StreamReader sr = new StreamReader(path, Encoding.Default);
            String line;

            while ((line = sr.ReadLine()) != null)
            {
                wordList.Add(line.ToString());
            }
            sr.Close();
            return wordList;
        }
    }
}
