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? |