Gets the major part of the version number.
[Visual Basic] Public ReadOnly Property FileMajorPart As Integer [C#] public int FileMajorPart {get;} [C++] public: __property int get_FileMajorPart(); [JScript] public function get FileMajorPart() : int;
A value representing the major part of the version number.
Typically, a version number is displayed as "major number.minor number.build number.private part number". A file version number is a 64-bit number which holds the version number for a file as follows:
This property gets the first set of 16 bits.
The following example calls GetVersionInfo to get a FileVersionInfo for the Notepad. Then it prints the FileMajorPart in a text box. This code assumes TextBox1 has been instantiated.
[Visual Basic]
Private Sub GetFileMajorPart() Dim myFileVersionInfo As System.Winforms.FileVersionInfo myFileVersionInfo = System.Winforms.FileVersionInfo.GetVersionInfo("c:\WINNT\Notepad.exe") 'Print the file name and version number. TextBox1.Text = "File Major Part Number: " & myFileVersionInfo.FileMajorPart End Sub
FileVersionInfo Class | FileVersionInfo Members | System.WinForms Namespace | FileBuildPart | FileMinorPart | FileVersion | System.WinForms.Version