In this article, we will see the multiple examples to get the public IP Address of a computer using C# . You should check out the docs . Example 1, static string GetPublicIPAddress () { String address = "" ; WebRequest request = WebRequest . Create ( "http://checkip.dyndns.org/" ); using ( WebResponse response = request . GetResponse ()) using ( System . IO . StreamReader stream = new System . IO . StreamReader ( response . GetResponseStream ())) { address = stream . ReadToEnd (); } int first = address . IndexOf ( "Address: " ) + 9 ; int last ...
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers