Check out example codes for "how to ping in c# forms". It will help you in understanding the concepts better.

Code Example 1

private void btnPing_Click(object sender, EventArgs e)
{
    Ping ping = new Ping();
    PingReply reply = ping.Send(txtIP.Text, 1000);
    MessageBox.Show(reply.Status.ToString(), "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
}

Learn ReactJs, React Native from akashmittal.com