While searching for a particular registry key under Local machine SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall using C#, the >net framework application is giving different result than in .Net core App
RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", false);
Console.WriteLine(key.GetSubKeyNames().Length);
foreach (String keyName in key.GetSubKeyNames())
{
    RegistryKey subkey = key.OpenSubKey(keyName);
    string displayName = subkey.GetValue("DisplayName") as string;
    if (displayName == null)
    {
        Console.WriteLine("NULL");
        continue;
    }
    Console.WriteLine(displayName);
    if (displayName.Contains("MyApp") == true)
    {
        Console.WriteLine("Found");
        return;
    }
}
.Net framework giving out 863 names and .net core giving 247 different set of outcome.
 
     
    