FileVersionInfo.IsPreRelease Property
.NET Framework 4.5
Gets a value that specifies whether the file is a development version, rather than a commercially released product.
Assembly: System (in System.dll)
The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. Then it displays whether this version is a prerelease version in a text box. This code assumes textBox1 has been instantiated.
private void GetIsPreRelease() { // Get the file version for the notepad. FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe"); // Print whether the file is a prerelease version. textBox1.Text = "File is prerelease version " + myFileVersionInfo.IsPreRelease; }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.