title: Make Ping request in Visual Studio C#
body: <p>so I'm very new to Visual Studio and C# but I'm having trouble making a Ping cmd in my app. I have included the code and images. Basically, when I run the app and try to make the ping request it just takes me to the <code>App.g.i.cs</code> file and highlights this code</p>
  <pre><code>#if DEBUG &amp;&amp; !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
              UnhandledException += (sender, e) =&gt;
              {
                  if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
              };
  #endif
          }
      }
  }
  </code></pre>
  <p>So I don't know where I'm really going wrong. I know this might be a really dumb question but I'm just not familiar with Visual Studio yet. Would love any suggestions :)
  Here is the code</p>
  <pre><code>using System;
  using System.Collections.Generic;
  using System.IO;
  using System.Linq;
  using System.Runtime.InteropServices.WindowsRuntime;
  using Windows.Foundation;
  using Windows.Foundation.Collections;
  using Windows.UI.Xaml;
  using Windows.UI.Xaml.Controls;
  using Windows.UI.Xaml.Controls.Primitives;
  using Windows.UI.Xaml.Data;
  using Windows.UI.Xaml.Input;
  using Windows.UI.Xaml.Media;
  using Windows.UI.Xaml.Navigation;
  using System.Net;
  using System.Net.NetworkInformation;
  using System.Text;
  using System.ComponentModel;
  using System.Threading;
  
  // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&amp;clcid=0x409
  
  namespace Ping_IP
  {
      /// &lt;summary&gt;
      /// An empty page that can be used on its own or navigated to within a Frame.
      /// &lt;/summary&gt;
      public sealed partial class MainPage : Page
      {
          public MainPage()
          {
              this.InitializeComponent();
          }
  
          private void Button_Click(object sender, RoutedEventArgs e)
          {
              Ping pingsender = new Ping();
  
              PingReply reply = pingsender.Send(ip_address.ToString());
              if (reply.Status == IPStatus.Success)
              {
                  status_info.Text = &quot;Sucess! - &quot; + DateTime.Now.ToLocalTime();  //reply.Status.ToString();
              } else
              {
                  status_info.Text = &quot;Failed... - &quot; + DateTime.Now.ToLocalTime();
              }
          }
      }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/jLStS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jLStS.jpg" alt="error message" /></a></p>
  <p><a href="https://i.stack.imgur.com/E0O78.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E0O78.jpg" alt="app main page" /></a></p>