[I][B]cannot implicitly convert type void to system.net.networkinformation.pingreply [/B][/I]
private void IPlook_Tick(object sender, EventArgs e)
{
Properties.Settings.Default.nextIP += 1;
if (Properties.Settings.Default.nextIP >= 255)
{
IPlook.Stop();
}
string IP = "192.168.0." + Properties.Settings.Default.nextIP.ToString();
CurIP.Text = IP;
//See if online
try
{
byte[] buffer = new Byte[10];
PingOptions options = new PingOptions();
string textLabel = "";
Ping ping = new Ping();
PingReply reply = ping.SendAsync(IP, 100, buffer, options);
if (reply.Status == IPStatus.Success)
{
string Hostname = Dns.GetHostByAddress(IP).HostName;
dataGridView1.Rows.Add(Hostname, IP, "Online");
}
else
{
}
}
catch (Exception er)
{
MessageBox.Show("Something Went Wrong", "Error Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
[I][B]cannot implicitly convert type void to system.net.networkinformation.pingreply [/B][/I]
private void IPlook_Tick(object sender, EventArgs e)
{
Properties.Settings.Default.nextIP += 1;
if (Properties.Settings.Default.nextIP >= 255)
{
IPlook.Stop();
}
string IP = "192.168.0." + Properties.Settings.Default.nextIP.ToString();
CurIP.Text = IP;
//See if online
try
{
byte[] buffer = new Byte[10];
PingOptions options = new PingOptions();
string textLabel = "";
Ping ping = new Ping();
PingReply reply = ping.SendAsync(IP, 100, buffer, options);
if (reply.Status == IPStatus.Success)
{
string Hostname = Dns.GetHostByAddress(IP).HostName;
dataGridView1.Rows.Add(Hostname, IP, "Online");
}
else
{
}
}
catch (Exception er)
{
MessageBox.Show("Something Went Wrong", "Error Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
[I][B]cannot implicitly convert type void to system.net.networkinformation.pingreply [/B][/I]
private void IPlook_Tick(object sender, EventArgs e)
{
Properties.Settings.Default.nextIP += 1;
if (Properties.Settings.Default.nextIP >= 255)
{
IPlook.Stop();
}
string IP = "192.168.0." + Properties.Settings.Default.nextIP.ToString();
CurIP.Text = IP;
//See if online
try
{
byte[] buffer = new Byte[10];
PingOptions options = new PingOptions();
string textLabel = "";
Ping ping = new Ping();
PingReply reply = ping.SendAsync(IP, 100, buffer, options);
if (reply.Status == IPStatus.Success)
{
string Hostname = Dns.GetHostByAddress(IP).HostName;
dataGridView1.Rows.Add(Hostname, IP, "Online");
}
else
{
}
}
catch (Exception er)
{
MessageBox.Show("Something Went Wrong", "Error Alert", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
PingReply reply = ping.SendAsync(IP, 100, buffer, options);
private async Task Pinger()
{
var ip = IPAddress.Parse("184.150.152.168");
pingSender.PingCompleted += pingFinished;
pingSender.SendAsync(ip, 100);
}
private void pingFinished(object sender, PingCompletedEventArgs e)
{
if (e.Reply.Status == IPStatus.Success)
{
MessageBox.Show("Ping Sucess");
}
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.