Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 "Add Using Directive" improvements

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Uniwares Posted - May 04 2021 : 09:10:09 AM
Would be nice if VA could allow us to chose where to insert the using directive. Not always the beginning of the file is the right place. Sometimes its better to place it inside the current namespace declaration.

There is an good discussion on SO about this: https://stackoverflow.com/questions/125319/should-using-directives-be-inside-or-outside-the-namespace
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - May 05 2021 : 08:17:25 AM
That makes sense, I have put in a feature request for this, to see what our developers make of it:

case=145674
Uniwares Posted - May 04 2021 : 11:06:46 AM
Good questions, perfect would be if VA could detect possible clashes and place it accordingly, but that would be a deep analysis of all code in the solution. For starters probably a setting in the options "innermost" or "outermost", might be sufficient.
feline Posted - May 04 2021 : 10:34:17 AM
This is an interesting thought.

Would you want to select current namespace or top of file each time? Or just leave this as a setting in VA Options, so it always uses that setting?

What if you are 2 or 3 namespaces deep, just use the current, probably most deeply nested namespace? Or ask which namespace?

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000