Is there a way to only define your parent namespace with out having to define all the children as well?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I assume you are referring to something like the Java language that supports:
As far as I know the * in the above statement is a wild-card so you don’t have to define every method in the namespace.
In .net the various libraries are grouped together by namespaces and some of them appear to be subsets but I don’t think they are actually represented as a heirarchy internally.
So for example if you wanted to use the StringBuilder class you would add in:
but if you then wanted use Regular Expressions you would also add in
Visual Studio has pretty good detection of this kind of thing so as long as you typed in a class name that is inside one of the libraries like
then after you had typed the first
Regexyou would be able to right click on it and choose the Resolve menu to either make it fully qualified likeor add a using statement at the top (as demonstrated above)