File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,13 @@ public string Copyright
1919
2020 public About ( )
2121 {
22- var ver = Assembly . GetExecutingAssembly ( ) . GetName ( ) . Version ;
22+ var assembly = Assembly . GetExecutingAssembly ( ) ;
23+ var ver = assembly . GetName ( ) . Version ;
2324 if ( ver != null )
24- Version = $ "{ ver . Major } .{ ver . Minor } ";
25- var attributes = Assembly . GetExecutingAssembly ( )
26- . GetCustomAttributes ( typeof ( AssemblyCopyrightAttribute ) , false ) ;
27- if ( attributes . Length > 0 )
28- Copyright = ( ( AssemblyCopyrightAttribute ) attributes [ 0 ] ) . Copyright ;
25+ Version = $ "{ ver . Major } .{ ver . Minor : D2} ";
26+
27+ var copyright = assembly . GetCustomAttribute < AssemblyCopyrightAttribute > ( ) ;
28+ Copyright = copyright ? . Copyright ;
2929
3030 DataContext = this ;
3131 InitializeComponent ( ) ;
You can’t perform that action at this time.
0 commit comments