FileVersionInfo.ProductMinorPart Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient la partie mineure du numéro de version du produit avec lequel le fichier est associé.
public:
property int ProductMinorPart { int get(); };
public int ProductMinorPart { get; }
member this.ProductMinorPart : int
Public ReadOnly Property ProductMinorPart As Integer
Valeur de propriété
Valeur représentant la partie mineure du numéro de version du produit ou null si le fichier ne contenait pas d’informations de version.
Exemples
L’exemple d’appel GetVersionInfo suivant permet d’obtenir le FileVersionInfo Bloc-notes. Ensuite, il imprime le ProductMinorPart contenu dans une zone de texte. Ce code suppose qu’il textBox1 a été instancié.
private void GetProductMinorPart()
{
// Get the file version for the notepad.
FileVersionInfo myFileVersionInfo =
FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");
// Print the product minor part number.
textBox1.Text = "Product minor part number: " + myFileVersionInfo.ProductMinorPart;
}
Private Sub GetProductMinorPart()
' Get the file version for the notepad.
Dim myFileVersionInfo As FileVersionInfo = _
FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
' Print the product minor part number.
textBox1.Text = "Product minor part number: " & myFileVersionInfo.ProductMinorPart
End Sub
Remarques
En règle générale, un numéro de version est affiché sous la forme « numéro.major number.minor number.build number.private part number ». Un numéro de version de produit est un numéro 64 bits qui contient le numéro de version comme suit :
Les 16 premiers bits sont le ProductMajorPart nombre.
Les 16 bits suivants sont le ProductMinorPart nombre.
Le troisième jeu de 16 bits est le ProductBuildPart nombre.
Les 16 derniers bits sont le ProductPrivatePart nombre.
Cette propriété obtient le deuxième jeu de 16 bits.