C# 使用默认浏览器打开链接

public void OpenUrl(string link)
{
RegistryKey key = Registry.ClassesRoot.OpenSubKey(@"http\shell\open\command\");
string s = key.GetValue("").ToString();
System.Diagnostics.Process.Start(s.Substring(0, s.Length - 8), link);
}

posted @ 2019-02-25 15:46  bobo-bobo  阅读(1617)  评论(0编辑  收藏  举报