• Home
  • 简单生活
  • 一般技术
  • .NET
  • XML-RPC
  • FreeBSD
  • Linux
  • Python
  • Database
  • 书籍阅读
  • 电视电影
  • 网站相关
  • 乱七八糟
  • 娱记
  • 常用软件
  • 标签云

  • 如何获取.NET程序的DLL版本

    2009年06月28日 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>");
       }

    发表评论

    *必填

    *必填 (不会被公开)

    *
    To prove you're a person (not a spam script), type the security word shown in the picture.
    Anti-Spam Image