title: How to check if a registry value exists using C#?
body: <p>How to check if a registry value exists by C# code?
  This is my code, I want to check if 'Start' exists.</p>
  
  <pre><code>public static bool checkMachineType()
  {
      RegistryKey winLogonKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\services\pcmcia", true);
      string currentKey= winLogonKey.GetValue("Start").ToString();
  
      if (currentKey == "0")
          return (false);
      return (true);
  }
  </code></pre>