using System;
using System.IO;
using System.Linq;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
bool exist = (from line in File.ReadAllLines("d:\\test.txt")
where line == "Text File Line three"
select line).Count() > 0;
if (exist)
Console.WriteLine("Exist"); // Exist
else
Console.WriteLine("NOT Exist");
}
}
}
/*
run:
Exist
*/