I write a code to read many text files and grouped them in one file called (all.txt), after that I read all.txt file to count the word frequency, and the result appears in richtextbox. the code work well but the problem when I run the program, part of result appears then the program is hang without responding. I think that may be from memory, my computer RAM is 4 GB any help would be appreciated. note:my code work well in small text file.here's part of my code :
StreamWriter w=new StreamWriter(@"C:\documents\all.txt");
w.Write(all);
w.Close();