Improve company productivity with a Business Account.Sign Up
Open in new window
Dim installed_versions As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\NET Framework Setup\NDP")
Dim version_names As String() = installed_versions.GetSubKeyNames()
Dim Framework As Double = Convert.ToDouble(version_names(version_names.Length - 1).Remove(0, 1), CultureInfo.InvariantCulture)
Dim SP As Integer = Convert.ToInt32(installed_versions.OpenSubKey(version_names(version_names.Length - 1)).GetValue("SP", 0))
Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
Dim assembly As Assembly = Assembly.GetExecutingAssembly()
Dim fvi As FileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location)
Dim version As String = fvi.FileVersion
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.