Here is the code I have tried, it returns an error ("Attempt to access the method failed: System.IO.StreamReader..ctor(System.String)")
public bool CheckIfWord(string wordToBeTested)
{
string testing = wordToBeTested.ToLower();
string line;
StreamReader FileRead = new StreamReader("/dictionary.txt");
while ((line = FileRead.ReadLine()) != null)
{
if (testing == line)
verification = true;
else
verification = false;
}
return verification;
}
Please let me know what I am doing wrong...
This post has been edited by d.buckner: 30 April 2011 - 03:57 PM

New Topic/Question
Reply


MultiQuote





|