I am looking at a code base where the author (one I respect) consistently places using statements inside of the namespace, as opposed to above it. Is there some advantage (more efficient GC?) to doing so or is this just a code style preference?
Cheers,
Berryl
Answer
If you have multiple namespaces in the same file then you will be scoping usings only to the containing namespace instead of to all namespace in the entire file.
Also see (just found this good explanation) Should 'using' statements be inside or outside the namespace?
No comments:
Post a Comment