Skip to content

Instantly share code, notes, and snippets.

@harshityadav95
Created August 18, 2017 12:29
Show Gist options
  • Save harshityadav95/a0d001f79a817009412668d939eeb0a0 to your computer and use it in GitHub Desktop.
Save harshityadav95/a0d001f79a817009412668d939eeb0a0 to your computer and use it in GitHub Desktop.
code
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