Udostępnij przez


FileVersionInfo.FileBuildPart Właściwość

Definicja

Pobiera numer kompilacji pliku.

public:
 property int FileBuildPart { int get(); };
public int FileBuildPart { get; }
member this.FileBuildPart : int
Public ReadOnly Property FileBuildPart As Integer

Wartość właściwości

Wartość reprezentująca numer kompilacji pliku lub null jeśli plik nie zawiera informacji o wersji.

Przykłady

Poniższe przykładowe wywołania GetVersionInfo w celu pobrania FileVersionInfo notatnika. Następnie drukuje element FileBuildPart w polu tekstowym. W tym kodzie założono, że textBox1 wystąpienie zostało utworzone.

private:
    void GetFileBuildPart()
    {
        // Get the file version for the notepad.
        FileVersionInfo^ myFileVersionInfo =
            FileVersionInfo::GetVersionInfo(Environment::SystemDirectory + "\\Notepad.exe");

        // Print the file build number.
        textBox1->Text = String::Format( "File build number: {0}", myFileVersionInfo->FileBuildPart );
    }
private void GetFileBuildPart()
{
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo =
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");

    // Print the file build number.
    textBox1.Text = "File build number: " + myFileVersionInfo.FileBuildPart;
}
Private Sub GetFileBuildPart()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
    
    ' Print the file build number.
    textBox1.Text = "File build number: " & myFileVersionInfo.FileBuildPart
End Sub

Uwagi

Zazwyczaj numer wersji jest wyświetlany jako "numer główny.numer pomocniczy.numer kompilacji.numer prywatny". Numer wersji pliku to numer 64-bitowy zawierający numer wersji pliku w następujący sposób:

Ta właściwość pobiera trzeci zestaw 16 bitów.

Dotyczy

Zobacz też