Well. Supposing that you need to compare lines using char by char equality, it can be as simple as this:
var result = File.ReadLines(@"D:\TEMP\x.txt").Distinct();
Still, if you need performance, you need to dig deeper to optimize. I have to admit, this is not optimized for comparing only the two consecutive rows. It is doing overall search.
To take only previous line into account, you can use this one instead:
string prev = null;
foreach(var curr in File.ReadLines(@"D:\TEMP\x.txt"))
{
if(curr != prev) Console.WriteLine(curr);
prev = curr;
}