Version number in .NET Compact Framework application

后端 未结 4 1827
旧巷少年郎
旧巷少年郎 2021-02-10 00:35

I need to display the .NET Compact Framework version number on the screen. I am using .NET CF 2.0 with Windows CE 4.0.

So far, I have been ignoring the version numb

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-10 00:52

    System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Major System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Minor System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Build System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Revision

    Source: http://msdn.microsoft.com/en-us/library/system.version.aspx

    (Edit)

    Application.ProductVersion Property

    Gets the product version associated with this application.

    Not Available In Compact Framework But System.Reflection.Assembly.GetExecutingAssembly().GetName().Version Is.

    Source: http://msdn.microsoft.com/en-us/library/system.windows.forms.application.productversion.aspx

提交回复
热议问题