I’ve read a file into StringBuilder.
When I give a string as an input, if the word is present in the file, the output should be true.. If its not present, it should be false.. How do i do it? Could someone help me with the code? I’ve written the program till here.. How do i go further? Thanks alot.. 🙂
class Program
{
static void Main(string[] args)
{
using (StreamReader Reader = new StreamReader("C://myfile2.txt"))
{
StringBuilder Sb = new StringBuilder();
Sb.Append(Reader.ReadToEnd());
{
Console.WriteLine("The File is read");
}
}
}
}
1 Answer