Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Namespace not found
Message
From
18/08/2005 17:53:21
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
18/08/2005 17:44:59
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01042013
Message ID:
01042103
Views:
19
Thanks for the clarification.

>Hilmar,
>
>As Alan and Perry both said, you need to add the reference ... that's the "required" part, the "using" isn't actually required. That's because you can instantiate classes from that namespace without using a "Using" statement. The "Using" statement makes it easier to use "short-hand" when coding.
>
>As an example, say your main application namespace is "MyCompany" and you have "child" namespaces of MyCompany.Business, MyCompany.DataAccess, MyCompany.DataSets, etc. etc.
>
>As long as a reference to MyCompany.DataSets has been added to your project, you can fully qualify the namespace in code without having to add a "Using" statement:
>
>    MyCompany.DataSets.MyCustomerDataSet oData = new MyCompany.DataSets.MyCustomerDataSet();
>
>but, by the use of a "Using" statement, you can make things a lot more readable:
>
>using MyCompany.DataSets;
>
>...
>...
>
>    MyCustomerDataSet oData = new MyCustomerDataSet();
>
>
>~~Bonnie
>
>
>
>
>>I have two projects in one solution. Files in one project use one namespace, in another project, another namespace.
>>
>>In one of the projects, I want to use a class from the other project. I put:
>>
>>
>>using MySession // the namespace from the other project
>>...
>>
>>
>>and in this line, the compiler complains that the namespace can't be found. (I copied and pasted the namespace, to make sure it wasn't a spelling error.)
>>
>>What am I missing?
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform