获取DLL文件版本号的三种方法

方法一:

string version = System.Reflection.Assembly.LoadFrom(strFilePath).GetName().Version.ToString();

方法二:
Version ApplicationVersion = new Version(Application.ProductVersion);
string version = ApplicationVersion.Major.ToString();//获取主版本号  
               
方法三:            
System.Diagnostics.FileVersionInfo info = System.Diagnostics.FileVersionInfo.GetVersionInfo(strFilePath);  
string version = info.FileVersion;

posted on 2013-12-05 13:55  凤武九天  阅读(2682)  评论(0)    收藏  举报

导航