Is a fully qualified finding compared to the usage directive just a matter of opinion?

Now I find that I work mainly in a solo environment in which I type fully qualified methods, more and more, instead of using the use directive. I used to just stay in accordance with the most famous coding practice on the team.

Personally, it’s easier for me to read the detailed code at a glance, I type quickly, especially with autocomplete, and most often I use Google as a source of documentation, in which a fully qualified name returns a much narrower set of results. These are obviously very arbitrary reasons that prefer to fully qualify the use of the use directive.

On this day and in the age of refactoring tools, is there a specific reason why using the use directive is superior to fully qualified or vice versa, or is it a purely personal discretionary problem, such as the comment interval? Finally, what do you prefer and why?

+4
source share
4 answers

You can probably call it subjective.

Where I work / What I prefer to use with operators. It keeps names / lines short enough to simplify everyday life. Alternatively, you can just hover over something for a full name.

+3
source

I use use whenever possible. The less you need to read, the less you have to understand:

System.Windows.Form form = new System.Windows.Form();

just works more than

var form = new Form();

, , , , - , .

+1

I usually prefer to use / import for real code and full code for examples / etc.

0
source

readability.

Think about yourself after 1 year trying to read your code. You want it to be explicit and short and have only one point of information for each of the data (DRY principle).

0
source

All Articles