Thread: namespace query
View Single Post
  #6 (permalink)  
Old August 9th, 2016, 04:42 PM
Rod Stephens's Avatar
Rod Stephens Rod Stephens is offline
Wrox Author
Points: 3,145, Level: 23
Points: 3,145, Level: 23 Points: 3,145, Level: 23 Points: 3,145, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 641
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Ah ha! I suspect Microsoft added the static option to the using directive because Visual Basic has code modules. You can refer to methods defined in a code module without needing to refer to any class, but all methods must be inside classes in C#. The "using static" syntax lets you sort of weasel around that so you can refer to some methods without mentioning the class.

So that's where I think this comes from.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
Reply With Quote