Can any one help me in converting the .cs file into .dll programmatically?
Take a look at the CSharpCodeProvider class.
You're looking for the CSharpCodeProvider class.
For example:
var compiler = new CSharpCodeProvider(new Dictionary<string, string> { { "CompilerVersion", "v4.0" } });
var options = new CompilerParameters { OutputAssembly = path);
var results = compiler.CompileAssemblyFromFile(options, sourceFile);