本文为个人博客备份文章,原文地址:http://validvoid.net/windows-store-app-get-assembly-version/WinRT 中对反射做了很多限制,假设 Windows Store 应用引用了一个程序集 MyApp.Utils,其中有一 ...
本文为个人博客备份文章,原文地址:
http://validvoid.net/get='_blank'>windows-store-app-get-assembly-version/
WinRT 中对反射做了很多限制,假设 Windows Store 应用引用了一个程序集 MyApp.Utils
,其中有一个类叫做 MyUtils
,可以使用以下方法获得程序集 MyApp.Utils
的版本号和文件版本号。
获得程序集版本号
方法一
using System.Reflection;public static string GetAssemblyVersion(){ return Assembly.Load(new AssemblyName("MyApp.Utils")) .GetName().Version.ToString();}
原标题:Windows Store 应用中获取程序集版本号的方法
关键词:Windows
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。