The below if statement never resolves to true when the registry key isn’t found. What am I missing here?
if ((Convert.ToString(Registry.GetValue(key, "EnableLinkedConnections", "")) == "0") ||
(Convert.ToString(Registry.GetValue(key, "EnableLinkedConnections", "")) == null))
Convert.ToString on null as object returns “”. Try
string.IsNullOrEmpty().