Hi all.
I want to write an application in C#, which compare two files, generates report and returns Exit Code.
My C# code looks like below:
And there is a problem. When I use "/qc=binary" I get correct Exit Code, but report is not generated. When I use "/qc=binary " (with space between binary and "), I get report, but my Exit Code is always 0 (no matter, if files are the same or not). What I am doing wrong?
I want to write an application in C#, which compare two files, generates report and returns Exit Code.
My C# code looks like below:
Process bc3 = new Process();
bc3.StartInfo.FileName = Path to BCompare.exe;
bc3.StartInfo.Arguments = "/qc=binary" + "@script.txt" + file1 + file2 + report.html;
bc3.StartInfo.UseShellExecute = true;
bc3.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
bc3.StartInfo.CreateNoWindow = false;
bc3.Start();
bc3.WaitForExit();
Console.WriteLine(bc3.ExitCode);
bc3.StartInfo.FileName = Path to BCompare.exe;
bc3.StartInfo.Arguments = "/qc=binary" + "@script.txt" + file1 + file2 + report.html;
bc3.StartInfo.UseShellExecute = true;
bc3.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
bc3.StartInfo.CreateNoWindow = false;
bc3.Start();
bc3.WaitForExit();
Console.WriteLine(bc3.ExitCode);
Comment