1.GetName()
System.Reflection.Assembly asm = System.Reflection.Assembly.LoadFile(this.textBox1.Text);
strVersion = asm.GetName().Version.ToString();
2.自己获得
System.Reflection.Assembly asm = System.Reflection.Assembly.LoadFile(this.textBox1.Text);
int i=asm.FullName.ToLower().IndexOf("version");
int j=asm.FullName.IndexOf("=",i+1);
int k=asm.FullName.IndexOf(",",j+1);
strVersion=asm.FullName.Substring(j + 1, k-j-1);
3.FileVersionInfo
System.Diagnostics.FileVersionInfo fv = System.Diagnostics.FileVersionInfo.GetVersionInfo(this.textBox1.Text);
strVersion=fv.FileVersion;
转载于:https://www.cnblogs.com/mark200106/archive/2007/04/16/715995.html