Can we redirect from a Console application to a web application in C #?

I just need to redirect from console to web url, is this possible in net net c #? my code is below.

 public static class Program
    {
       public static void Main(String[] args)
        {
         Console.Write("Waiting for a connect to http://www.abcde.com");
         Console.Read();
        }
    }

maybe in c #? Please suggest.

+4
source share
3 answers

To open the URL in the default browser, you can use

System.Diagnostics.Process.Start("http://stackoverflow.com");
+10
source

If you want to open a website with a default web browser, you can use

System.Diagnostics.Process.Start("http://stackoverflow.com");
+7
source

, - System.Diagnostics.Process.Start("http://stackoverflow.com"); - .

, , - :

    // open in Internet Explorer
    Process.Start("iexplore", "http://stackoverflow.com/");
+5

Source: https://habr.com/ru/post/1667365/


All Articles