【发布时间】:2020-01-13 12:40:35
【问题描述】:
我在 WPF 应用程序中使用 .Net Core 3.1 Framework。我有一个按钮事件,我试图在点击时重定向到 Instagram url。但它给了我以下错误。
抛出异常:System.Diagnostics.Process.dll 中的“System.ComponentModel.Win32Exception”。
private void Insta_Click(object sender, RoutedEventArgs e)
{
try
{
string targetURL = "https://www.instagram.com/xyz/";
Process.Start(targetURL);
}
catch
{
}
}
【问题讨论】:
-
异常信息是什么?