using System;
using System.IO;
using System.Linq;
class Program
{
static string dataPath = @"c:\t.txt";
static void Main(string[] args)
{
var text = from line in File.ReadLines(dataPath)
where (line.Contains("a"))
select line;
File.WriteAllLines(@"C:\data.txt", text);
}
}