title: KinectSensor.KinectSensors.Count does not recognize a connected kinect?
body: <p>I am writing my first Kinect Application with the following user interface.
  <a href="https://i.stack.imgur.com/k6BeZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k6BeZ.png" alt="Kinect User Interface" /></a></p>
  <p>I am following <a href="https://www.youtube.com/watch?v=3FlxTPeKu1g" rel="nofollow noreferrer">this</a> tutorial for more context.</p>
  <p>The concept of the application consists only to integrate the camera of the Kinect into the desktop application. I think it might be important to note that I have a Kinect for Xbox One and its corresponding adapter using the Kinect SDK and Toolkit Version 1.8</p>
  <p>The code for the button event handling is the following is the following</p>
  <pre><code>    private void btnStream_Click(object sender, EventArgs e)
      {
          if (btnStream.Text == &quot;Stream&quot;)
          {
             
              if (KinectSensor.KinectSensors.Count &gt; 0)
              {
                 
                  ksensor = KinectSensor.KinectSensors[0];
                  KinectSensor.KinectSensors.StatusChanged += KinectSensors_StatusChanged;
                  
              }
              ksensor.Start();
              lblConnectionID.Text = ksensor.DeviceConnectionId;
  
          }
          else
          {
              if (ksensor != null &amp;&amp; ksensor.IsRunning)
              {
                  ksensor.Stop();
                  this.btnStream.Text = &quot;Stream&quot;;
                  this.pbStream.Image = null;
              }
          }
  
      }
  
      private void KinectSensors_StatusChanged(object sender, StatusChangedEventArgs e)
      {
          this.lblStatus.Text = ksensor.Status.ToString(); 
      }
  </code></pre>
  <p>and I get the following error from Visual Studio</p>
  <blockquote>
  <p>An unhandled exception of type 'System.NullReferenceException' occurred in WindowsFormsApplication1.exe</p>
  </blockquote>
  <p>Additional information: Object reference not set to an instance of an object.</p>
  <p>The error is pointing to this line of code:</p>
  <pre><code>ksensor.Start();
  </code></pre>
  <p>It is guaranteed that the ksensor variable is declared as follows:</p>
  <pre><code>private KinectSensor ksensor;
  </code></pre>
  <p>My question is why is my variable <code>KinectSensor.KinectSensors.Count</code> probably 0 while I am supposed to have 1 as the return value? Does my application not recognize my kinnect?</p>