FileVersionInfo.ProductMajorPart 속성

정의

이 파일과 관련된 제품에 대한 버전 번호의 주 부분을 가져옵니다.

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

속성 값

제품 버전 번호의 주 버전 부분을 나타내는 값이거나, 파일에 버전 정보가 없는 경우 null입니다.

예제

다음 예제에서는 를 호출 GetVersionInfo 하여 메모장에 대한 를 가져옵니다 FileVersionInfo . 그런 다음 텍스트 상자에 를 ProductMajorPart 인쇄합니다. 이 코드는 인스턴스화되었다고 가정합니다 textBox1 .

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

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

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

설명

일반적으로 버전 번호는 "major number.minor number.build number.private part number"로 표시됩니다. 제품 버전 번호는 다음과 같이 버전 번호를 포함하는 64비트 번호입니다.

이 속성은 첫 번째 16비트 집합을 가져옵니다.

적용 대상

추가 정보