FileVersionInfo.IsPreRelease Property

Definition

Obtiene un valor que especifica si el archivo pertenece a una versión de desarrollo, no a una versión comercial del producto.Gets a value that specifies whether the file is a development version, rather than a commercially released product.

public:
 property bool IsPreRelease { bool get(); };
public bool IsPreRelease { get; }
member this.IsPreRelease : bool
Public ReadOnly Property IsPreRelease As Boolean

Property Value

Boolean

true si el archivo es una versión preliminar; en caso contrario, false.true if the file is prerelease; otherwise, false.

Examples

En el ejemplo siguiente se llama a GetVersionInfo para obtener el FileVersionInfo para el Bloc de notas.The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. Después, muestra si esta versión es una versión preliminar en un cuadro de texto.Then it displays whether this version is a prerelease version in a text box. Este código supone que se ha creado una instancia de textBox1.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 = String::Concat( "File is prerelease version ", myFileVersionInfo->IsPreRelease );
    }
 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;
}
Private Sub GetIsPreRelease()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
    
    ' Print whether the file is a prerelease version.
    textBox1.Text = "File is prerelease version " & myFileVersionInfo.IsPreRelease
End Sub

Applies to