FileVersionInfo.ProductPrivatePart Właściwość

Definicja

Pobiera prywatny numer części produktu, z tym plikiem jest skojarzony.

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

Wartość właściwości

Wartość reprezentująca prywatny numer części produktu, z którym jest skojarzony ten plik lub null jeśli plik nie zawiera informacji o wersji.

Przykłady

Poniższe przykładowe wywołania GetVersionInfo w celu pobrania FileVersionInfo elementu dla Notatnika. Następnie drukuje element ProductPrivatePart w polu tekstowym. W tym kodzie przyjęto założenie textBox1 , że zostało utworzone wystąpienie.

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

        // Print the product private part number.
        textBox1->Text = String::Concat( "Product private part number: ", myFileVersionInfo->ProductPrivatePart );
    }
private void GetProductPrivatePart()
{
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo =
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");

    // Print the product private part number.
    textBox1.Text = "Product private part number: " + myFileVersionInfo.ProductPrivatePart;
}
Private Sub GetProductPrivatePart()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
    
    ' Print the product private part number.
    textBox1.Text = "Product private part number: " & myFileVersionInfo.ProductPrivatePart
End Sub

Uwagi

Zazwyczaj numer wersji jest wyświetlany jako "numer główny.numer pomocniczy.numer kompilacji.prywatny numer części". Numer wersji produktu to 64-bitowy numer, który zawiera numer wersji w następujący sposób:

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

Dotyczy

Zobacz też