-1

we have two ways of coding. Which one is the better approach?

var visibility = Windows.UI.Xaml.Visibility.Collapsed;

or

using Windows.UI.Xaml;
var visibility = Visibility.Collapsed;
Abhiram Chennuru
  • 531
  • 1
  • 4
  • 11
  • possible duplicate of [How is performance affected by an unused using statement](http://stackoverflow.com/questions/1162766/how-is-performance-affected-by-an-unused-using-statement) – user2864740 Jul 14 '15 at 04:28
  • http://stackoverflow.com/questions/12026820/do-unused-usings-in-net-affect-performance?lq=1 , http://stackoverflow.com/questions/1162766/how-is-performance-affected-by-an-unused-using-statement – user2864740 Jul 14 '15 at 04:29

1 Answers1

2

No. It makes no difference1

The compiled code is the same. The using Directive merely instructs the compiler how to resolve the types used.


1 This is true of C#; WinRT or WPF or XAML does not change this.

user2864740
  • 60,010
  • 15
  • 145
  • 220