I am Very new at C# and have written a fairly clunky code. I have been doing a lot of courses online and a lot say that there are several ways to approach problems. Now i have m
Instead of using:
document.Words[i].Text
multiple times, do:
String Text = document.Words[i].Text;
at the top of the for loop and use "Text" (or whatever you want to call it) instead. Eugene Podskal's suggestions seem very helpful but this simple improvement (that I was thinking of before seeing Eugene's response) is very easy to do and could make a substantial improvement.