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

Pass GUID As Parameter To Action Using ASP.NET MVC ContribGrid