title: NullReferenceException when assigning RegistryKey
body: <p>I am trying to over hand a RegistryKey to a class in my dll. Reading the Key into an temporary Key works(checked in debugger), but a NullReferenceException gets thrown when i try to assign it to the target RegistryKey-variable in that static class.</p>
  
  <p>The following code is executed in the Constructor of the MainWindow (WPF-application)</p>
  
  <pre><code>try {
      RegistryKey tK;
      tK = Registry.ClassesRoot.OpenSubKey("Software").OpenSubKey("Software Untergrund");
      Options.SU = tK; //&lt;= NullRefenceException gets thrown here
  } catch (NullReferenceException e) {
      Console.WriteLine(e.StackTrace);
      throw;
  }
  </code></pre>
  
  <p>Thanks for help in advance. </p>