How in C# to check if the computer is in local network?

Hello!
Make a program to check the operation (online) computers in LAN.
Google and modifications could create such a code:
private Boolean ping(String host)
{
 using (var p = new Process())
{
 p.StartInfo.FileName = "ping.exe";
 p.StartInfo.Arguments = "-n 1 " + host;
 p.StartInfo.UseShellExecute = false;
 p.StartInfo.RedirectStandardOutput = true;
 p.StartInfo.CreateNoWindow = true;
 p.StartInfo.StandardOutputEncoding = Encoding.GetEncoding("CP866");
p.Start();

 string output = p.StandardOutput.ReadToEnd();
 Boolean status = output.Contains("TTL=");
 return status;
}
 }

But I feel that this bike with a bunch of crutches...
Is it possible somehow easier and more elegant to check if the computer knowing its ip?
Application C# Windows Form (.NET Framework)

PS in Python for example it's possible to do a couple of lines:
response = subprocess.call(["ping", "-c", "1", host], stdout=DNULL)
if response == 0:
 print("Available!")


I can't believe that in C# everything is so much more cumbersome...
June 14th 19 at 18:14
1 answer
June 14th 19 at 18:16
Solution
Thank you, all perfectly earned!!! - Pete commented on June 14th 19 at 18:19

Find more questions by tags C#ProgrammingWindows Forms