.NET 进程、应用程序域与对象上下文深度解析
1. 进程启动的精细调整
在 C# 中,我们可以通过 ProcessStartInfo 类来精细调整进程的启动。以下是一些常用的属性:
public bool RedirectStandardInput { get; set; }
public bool RedirectStandardOutput { get; set; }
public Encoding StandardErrorEncoding { get; set; }
public Encoding StandardOutputEncoding { get; set; }
public bool UseShellExecute { get; set; }
public string Verb { get; set; }
public string[] Verbs { get; }
public ProcessWindowStyle WindowStyle { get; set; }
public string WorkingDirectory { get; set; }
下面是一个修改后的 StartAndKillProcess() 方法示例,它将启动 Microsoft Internet Explorer 并导航到 www.facebook.com ,同时将窗口最大化显示:
static void StartAndKill
超级会员免费看
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



