获取Exe版本号

    技术2022-05-11  9

    using System.Reflection;

    using System.Diagnostics;

    Method1: Assembly.GetExecutingAssembly().GetName().Version

    Method2:

    FileVersionInfo info = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);Console.WriteLine(info.FileVersion);Console.WriteLine(info.CompanyName);


    最新回复(0)