Created
August 18, 2017 12:29
-
-
Save harshityadav95/a0d001f79a817009412668d939eeb0a0 to your computer and use it in GitHub Desktop.
code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ClassLibrary1; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.NetworkInformation; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("hELLO wORLD"); | |
Class1 obj = new Class1(); | |
double downSpeed = obj.startDownload(); | |
Console.WriteLine("Your Download Speed is :" + downSpeed); | |
try | |
{ | |
Ping myPing = new Ping(); | |
//PingReply reply = myPing.Send("www.facebook.com", 1000); | |
PingReply reply = myPing.Send("www.facebook.com"); | |
if (reply != null) | |
{ | |
Console.WriteLine("Status : " + reply.Status + " \n Time : " + reply.RoundtripTime.ToString() + " \n Address : " + reply.Address + "" + reply.Options.Ttl + " Buffer is "); | |
//Console.WriteLine(reply.ToString()); | |
} | |
} | |
catch | |
{ | |
Console.WriteLine("ERROR: You have Some TIMEOUT issue"); | |
} | |
Console.ReadKey(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment