.net 用VisualStudio调用C#程序

vltsax25  于 2023-01-14  发布在  .NET
关注(0)|答案(1)|浏览(116)

我做了一个CMD程序,可以将照片从PNG格式转换为SVG格式。如何在C#程序中调用此程序?
照片路径为:

`var path = @"C:\Users\";

    var sourcePath = Path.Combine(path, @"emoji1.png");

    var destPath = Path.Combine(path, @"png01.svg");`

我想在其他C#程序中打开我的cmd照片转换程序'

bcs8qyzn

bcs8qyzn1#

var arguments = ""; //optional, if your cmd converter can accept path to photo as an argument - you can put it here
var proc = Process.Start("path to executable", arguments);
proc.WaitForExit();// if you need to work in sync with that app

相关问题