FileVersionInfo.FileVersion 속성

정의

파일 버전 번호를 가져옵니다.

public:
 property System::String ^ FileVersion { System::String ^ get(); };
public string? FileVersion { get; }
public string FileVersion { get; }
member this.FileVersion : string
Public ReadOnly Property FileVersion As String

속성 값

파일의 버전 번호이거나 null 파일에 버전 정보가 없는 경우입니다.

예제

다음 예제에서는 메모장을 가져오기 GetVersionInfo 위해 호출 FileVersionInfo 합니다. 그런 다음, 텍스트 상자에 파일 설명 및 버전 번호를 출력합니다. 이 코드는 인스턴스화되었다고 가정합니다 textBox1 .


using System;
using System.IO;
using System.Diagnostics;

class Class1
{
    public static void Main(string[] args)
    {
        // Get the file version for the notepad.
        FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(Path.Combine(Environment.SystemDirectory, "Notepad.exe"));

        // Print the file name and version number.
        Console.WriteLine("File: " + myFileVersionInfo.FileDescription + Environment.NewLine +
           "Version number: " + myFileVersionInfo.FileVersion);
    }
}
Imports System.IO
Imports System.Diagnostics



Class Class1

    Public Shared Sub Main(ByVal args() As String)
        ' Get the file version for the notepad.
        Dim myFileVersionInfo As FileVersionInfo = FileVersionInfo.GetVersionInfo(Path.Combine(Environment.SystemDirectory, "Notepad.exe"))


        ' Print the file name and version number.
        Console.WriteLine("File: " + myFileVersionInfo.FileDescription + Environment.NewLine + "Version number: " + myFileVersionInfo.FileVersion)

    End Sub
End Class

설명

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

적용 대상

추가 정보