如何取得dll檔的版本號
use System.Diagnostics.FileVersionInfo
FileVersionInfo info = FileVersionInfo.GetVersionInfo(YourFileNameHere);
string version = info.FileMajorPart + "." + info.FileMinorPart + "." + info.FileBuildPart;
Example:
using System.Diagnostics;
FileVersionInfo info_1 = FileVersionInfo.GetVersionInfo(@"C:\Windows\System32\PCI_DMC.dll");
FileVersionInfo info_2 = FileVersionInfo.GetVersionInfo(@"C:\Windows\System32\PCI_DMC_01.dll");
string version_1 = info_1.FileMajorPart + "." + info_1.FileMinorPart + "." + info_1.FileBuildPart + "." + info_1.FilePrivatePart;
string version_2 = info_2.FileMajorPart + "." + info_2.FileMinorPart + "." + info_2.FileBuildPart + "." + info_2.FilePrivatePart;