FileVersionInfo.FileMinorPart 属性
定义
获取文件版本号的次要部分。Gets the minor part of the version number of the file.
public:
property int FileMinorPart { int get(); };
public int FileMinorPart { get; }
member this.FileMinorPart : int
Public ReadOnly Property FileMinorPart As Integer
属性值
表示文件版本号次要部分的值,当文件不包含版本信息时则为 0(零)。A value representing the minor part of the version number of the file or 0 (zero) if the file did not contain version information.
示例
下面的示例调用 GetVersionInfo 以获取 FileVersionInfo 记事本的。The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. 然后,它将打印 FileMinorPart 在文本框中。Then it prints the FileMinorPart in a text box. 此代码假定 textBox1 已实例化。This code assumes textBox1 has been instantiated.
private:
void GetFileMinorPart()
{
// Get the file version for the notepad.
FileVersionInfo^ myFileVersionInfo =
FileVersionInfo::GetVersionInfo( Environment::SystemDirectory + "\\Notepad.exe" );
// Print the file minor part number.
textBox1->Text = String::Concat( "File minor part number: ", myFileVersionInfo->FileMinorPart );
}
private void GetFileMinorPart()
{
// Get the file version for the notepad.
FileVersionInfo myFileVersionInfo =
FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");
// Print the file minor part number.
textBox1.Text = "File minor part number: " + myFileVersionInfo.FileMinorPart;
}
Private Sub GetFileMinorPart()
' Get the file version for the notepad.
Dim myFileVersionInfo As FileVersionInfo = _
FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
' Print the file minor part number.
textBox1.Text = "File minor part number: " & myFileVersionInfo.FileMinorPart
End Sub
注解
通常,版本号显示为 "主编号. 次要版本号. 内部版本号. 内部版本号. 专用号"。Typically, a version number is displayed as "major number.minor number.build number.private part number". 文件版本号是一个64位的数字,它保存文件的版本号,如下所示:A file version number is a 64-bit number that holds the version number for a file as follows:
前16位是 FileMajorPart 数字。The first 16 bits are the FileMajorPart number.
接下来的16位是 FileMinorPart 数字。The next 16 bits are the FileMinorPart number.
第三个16位集是 FileBuildPart 数字。The third set of 16 bits are the FileBuildPart number.
最后16位是 FilePrivatePart 数字。The last 16 bits are the FilePrivatePart number.
此属性获取第二组16位。This property gets the second set of 16 bits.