Donate

.NET Framework Version Checker in your PC Using C#

Here's a repost of a .NET Version Checker I found in the internet.
const string regLocation = "SOFTWARE\\Microsoft\\NET Framework Setup\\NDP";  
        static void Main(string[] args){  
        Console.WriteLine(".NET Framework versions installed");  
        Console.WriteLine("---------------------------------");  
        Console.WriteLine();  
        RegistryKey masterKey = Registry.LocalMachine.OpenSubKey(regLocation);  
        RegistryKey tempKey;  
        if (masterKey == null)  
        {  
          Console.WriteLine("Null Key!");  
        }  
        else  
        {  
          string[] SubKeyNames = masterKey.GetSubKeyNames();  
          for (int i = 0; i < SubKeyNames.Length; i++)  
          {  
            tempKey = Registry.LocalMachine.OpenSubKey  
               (regLocation + "\\" + SubKeyNames[i]);  
            Console.Write(SubKeyNames[i]);  
            Console.WriteLine("\tVersion = {0}",   
               tempKey.GetValue("Version"));  
          }  
        }  
        Console.ReadKey();  
      }  
Reference: Check .NET Framework Version Installed

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.