未来の自分へ知識谷金

ゆーきのエンジニアブログ
C#Visual Studioプログラミング

【C#】Google検索する(ブラウザを開く)

.NETC#Visual StudioVisual Studio 2022

C#を使って指定のキーワードを使い、ブラウザを開いてGoogle検索を行うコードを記載します。

public void GoogleSearch(string keyword)
        {
            string searchUrl = "https://www.google.com/search?q=" + Uri.EscapeDataString(keyword);
            Process.Start(new ProcessStartInfo(searchUrl));
        }

以上!