This documentation is archived and is not being maintained.

FileVersionInfo.IsPreRelease Property

Gets a value that specifies whether the file is a development version, rather than a commercially released product.

[Visual Basic]
Public ReadOnly Property IsPreRelease As Boolean
[C#]
public bool IsPreRelease {get;}
[C++]
public: __property bool get_IsPreRelease();
[JScript]
public function get IsPreRelease() : Boolean;

Property Value

true if the file is prerelease; otherwise, false.

Example

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.

[Visual Basic] 
Private Sub GetIsPreRelease()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo("%systemroot%\Notepad.exe")
    
    ' Print whether the file is a prerelease version.
    textBox1.Text = "File is prerelease version " & myFileVersionInfo.IsPreRelease
End Sub 'GetIsPreRelease

[C#] 
private void GetIsPreRelease() {
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    // Print whether the file is a prerelease version.
    textBox1.Text = "File is prerelease version " + myFileVersionInfo.IsPreRelease;
 }
    

[C++] 
private:
void GetIsPreRelease() {
    // Get the file version for the notepad.
    FileVersionInfo* myFileVersionInfo = FileVersionInfo::GetVersionInfo(S"%systemroot%\\Notepad.exe");
 
    // Print whether the file is a prerelease version.
    textBox1->Text = String::Format( S"File is prerelease version {0}", __box(myFileVersionInfo->IsPreRelease));
 }
    

[JScript] 
private function GetIsPreRelease() {
    //Get the file version for the notepad.
    var myFileVersionInfo : FileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    //Print whether the file is a prerelease version.
    textBox1.Text = "File is prerelease version " + myFileVersionInfo.IsPreRelease;
 }
    

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

FileVersionInfo Class | FileVersionInfo Members | System.Diagnostics Namespace

Show: