[Solved] How to get specific words from Word document(*.doc) using C#? [closed]


A simple approach is using string.Split without argument(splits by white-space characters):

using (StreamReader sr = new StreamReader(path)) 
{
    while (sr.Peek() >= 0) 
    {
        string line = sr.ReadLine();
        string[] words = line.Split();
        foreach(string word in words)
        {
            foreach(Char c in word)
            {
                // ...
            }
        }
    }
}

Let me know, if you have any questions.

2

solved How to get specific words from Word document(*.doc) using C#? [closed]