title: How to check if ComputerName is INT
body: <p>I think I'm getting tired or stared at this too long.. I need a second set of eyes. If anything looks too long winded please let me know.</p>
  
  <p><strong>My Goal</strong>
  To check the local computer name and if it's an INT to then add it to HTTPClient Request to return related values from WebService. FYI - HostName is the ID Value of this particular table. However, if the value is NOT and INT then I want to replace the actual value for a fake one so I can see my page load correctly.</p>
  
  <p>Eventually, in the customer's environment, I will turn off the display of this page if the Local Computer that runs it, is not part of the correct group. That way they won't see this configuration page at all.</p>
  
  <p><strong>Actual Results</strong>
  Because the current VM I'm running the app on does not have an INT for the name, I get the following when I put in a breakpoint to check values. But I can still go to the localhost:2463/api/devices/101070701 and see the JSON results. So I just need to get UWP to place nice so I can see it within the APP.</p>
  
  <p>HostName = 0</p>
  
  <p>_HostName = LOCALVM_ComputerName.</p>
  
  <p><strong>DeviceIDService</strong></p>
  
  <pre><code>    public class DeviceIDService
  {
      public static DeviceIDService Instance = new DeviceIDService();
  
      private DeviceIDService()
      {
          foreach (HostName DisplayName in NetworkInformation.GetHostNames())
          {
              if (DisplayName != null)
              {
                  var hostNames = NetworkInformation.GetHostNames();
                  var hostName = hostNames.FirstOrDefault(name =&gt; name.Type == HostNameType.DomainName)?.DisplayName ?? "???";
  
                  LocalName = hostName;
  
                  break;
              }
          }
          public string LocalName { get; set; }
      }
  }
  </code></pre>
  
  <p>DevicePageViewModel</p>
  
  <pre><code>public class DevicePageViewModel : ViewModelBase
  {
      private string _Hostname = DeviceIDService.Instance.LocalName;
      public string hostName { get; set; }
  
      public override async OnNavigatedToAsync ()
      {
         int HostName;
          bool isNumeric = int.TryParse(_Hostname, out HostName);
          if (isNumeric == true)
          {
              HostName = 101070701;
          }
          else
          {
              string hostName = HostName.ToString();
          }
  
          var uriD = new Uri("http://localhost:2463/api/Devices/" + HostName);
          HttpClient client = new HttpClient();
          try
          {
              var JsonResponseD = await client.GetStringAsync(uriD);
              var devicesResult = JsonConvert.DeserializeObject&lt;List&lt;Device&gt;&gt;(JsonResponseD);
              Devices = devicesResult;
  </code></pre>