Getting runtime version of a Silverlight assembly

后端 未结 3 1420
后悔当初
后悔当初 2020-12-30 22:18

I want to show my Silverlight 3 application\'s version number in the about box, but when I use a traditional .Net call like:

Assembly.GetExecutingAssembly().         


        
3条回答
  •  旧时难觅i
    2020-12-30 22:59

    You can use

    Assembly.GetExecutingAssembly()
     .GetCustomAttributes(false).OfType()
     .Single().Version;
    

提交回复
热议问题