如何获取.NET程序的DLL版本
如何获取.NET程序的DLL版本,就是用以下代码吧。
string path = Server.MapPath(HttpContext.Current.Request.ApplicationPath) + "/bin";
string[] aa = Directory.GetFiles(path, "*.dll");
for (int i = 0; i < aa.Length; i++)
{
Assembly ass = Assembly.LoadFile(aa[i]);
string[] infos = ass.FullName.Split(',');
Response.Write("<b>" + infos[0] + "</b><br>");
Response.Write(infos[1] + "<br>");
Response.Write(infos[2] + "<br>");
Response.Write(infos[3] + "<br>");
Response.Write("<hr>");
}
