I found the solution on documentation page of Beyond compare.
Add the following lines in file and save it with My Script.txt
file-report layout:side-by-side &
options:ignore-unimportant,display-context &
output-to:%3 output-options:html-color %1 %2
Now using command prompt run the following code BeyondCompate.exe @"My Script.txt" "1.txt" "2.txt" "Save.html" This will save the report in Save.html.
I incorporated this in my code as :
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.FileName = "cmd.exe" ;
startInfo.Arguments = "/c" + "BeyondCompare.exe" + " " + @"My Script.txt" + " " + "1.txt" + " " + "2.txt" + " " +"Save.html";
System.Diagnostics.Process.Start(startInfo);