如何获取 Silverlight 程序的产品版本?

发布于 2024-07-15 06:21:01 字数 88 浏览 3 评论 0原文

在 Winforms 中,我将使用 Application.ProductVersion 来获取代码的版本。 Silverlight 2.0 是否有等效的版本?

In Winforms I would use Application.ProductVersion to get the version of my code. Is there an equivalent for Silverlight 2.0?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

盛夏已如深秋| 2024-07-22 06:21:01

这是可能对您有帮助的链接:
确定我的 Silverlight 应用程序的版本

Here is link that may be helpful to you:
Determine the version of my Silverlight app

把时间冻结 2024-07-22 06:21:01

这只能通过反思来完成。 代码很

using System.Reflection;
Version v = new Version(Assembly.GetExecutingAssembly().FullName.Split(',')[1].Split('=')[1]);

笨拙,但它可以工作。

This can only be done by reflection. The code is

using System.Reflection;
Version v = new Version(Assembly.GetExecutingAssembly().FullName.Split(',')[1].Split('=')[1]);

Clunky, but it works.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文