以编程方式获取DLL的版本号 [英] Programmatically get the version number of a DLL

查看:77
本文介绍了以编程方式获取DLL的版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从任何.NET DLL中以编程方式获取版本号?

Is it possible to get the version number programmatically from any .NET DLL?

如果是,怎么办?

推荐答案

Assembly assembly = Assembly.LoadFrom("MyAssembly.dll");
Version ver = assembly.GetName().Version;

重要提示:
请注意,这不是原始问题的最佳答案。不要忘记在此页面上阅读更多内容。

Important: It should be noted that this is not the best answer to the original question. Don't forget to read more on this page.

这篇关于以编程方式获取DLL的版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆