My console application has a void in it which opens an external console application, to compare 2 text files.
I get no errors, so I assume it's working. But when I look at the output, I see NOTHING. When I open the application that compares the text files, it's working perfectly. So I think there must be something wrong with the void.
Here's my code. I used a combination of examples from MSDN as well as stackoverflow and other websites. But nothing so far. Maybe it's really obvious and I'm just stupid haha
using System.IO;
using System.Security.Permissions;
using System.Diagnostics;
static void Compare()
{
Process Compare = new Process();
try
{
Compare.StartInfo.UseShellExecute = false;
Compare.StartInfo.FileName = @"C:\Path\To\The\File.exe";
Compare.StartInfo.CreateNoWindow = true;
Compare.Start();
Compare.Kill();
}
catch (Exception)
{
Compare.Kill();
}
}
If anyone can tell me what is wrong with it, I would appreciate it! :)