C# 獲取程序集版本、文件版本
更新時間:2009年09月24日 11:58:02 作者:
C# 獲取程序集版本、文件版本的實現(xiàn)代碼。
一、獲取程序集版本
程序代碼
label版本.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
二、獲取文件版本
程序代碼
using System.Diagnostics;
FileVersionInfo myFileVersion = FileVersionInfo.GetVersionInfo (System.Windows.Forms.Application.ExecutablePath);
label版本.Text = myFileVersion.FileVersion;
程序代碼
復制代碼 代碼如下:
label版本.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
二、獲取文件版本
程序代碼
復制代碼 代碼如下:
using System.Diagnostics;
FileVersionInfo myFileVersion = FileVersionInfo.GetVersionInfo (System.Windows.Forms.Application.ExecutablePath);
label版本.Text = myFileVersion.FileVersion;
相關文章
使用HttpHanlder處理404:File not found的問題
本篇文章小編為大家介紹。使用HttpHanlder處理404:File not found的問題。需要的朋友參考下2013-04-04

