日期:2014-05-18  浏览次数:20758 次

如何用c#代码执行.net自带的工具,例如csc.exe和windiff.exe
我想用windiff.exe去比较两个文件是否相同
有没有什么好的现成代码?

------解决方案--------------------
没用过,只能帮顶了
------解决方案--------------------
System.Diagnostics.Process _Process = new System.Diagnostics.Process();

_Process.StartInfo.FileName = @"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\WinDiff.Exe";
_Process.StartInfo.Arguments = @" -D C:\1.TXT C:\2.TXT"; 
_Process.StartInfo.UseShellExecute = false;
_Process.StartInfo.RedirectStandardOutput = true;
_Process.Start();

------解决方案--------------------
UP