Solved

Class Library Question (namespaces)

Posted on 2003-12-01
4
253 Views
Last Modified: 2010-04-16
Is there a way to include Multiple Dlls (not the cs files) with the same namespace (ie one had Sample.test.one the other is Sample.test.two) into one Library or dll so that including that single Dll will include all the other dlls.. so

using Sample.test

will include all the Dlls in the Sample.test namespace?

I hope this makes sense...
0
Comment
Question by:willywig
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 18

Accepted Solution

by:
testn earned 250 total points
ID: 9854392
No. If you want to include the dll, you have to add the reference to those dlls only. "using" keyword will help you to write code in shorter form rather than putting everything as fully qualified name.
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 9856505
Actually if you have the same namespace as you mentioned and you put references to all DLLs, then you can use a single using Namespace; line and then you can use the classes from all DLLs in the code directly, without qualifying the namespace as well. However you still need to add references to all DLLs
0
 

Expert Comment

by:small_potato
ID: 9856707
Add dll(s) reference to a project means make early-binding to that dll(s). This action cannot embed that dll(s) to the project. So, you need to include the referenced dll(s) with the execuable.

And 'using Sample.test;" means that gives a shorter name for using the class under the Sample.test namespace. i.e. All the class under the namespace Sample.test can only use by only its class name one or two.
*It is just for convinence of coding, it doesn't have any help for the previous condition.


0
 
LVL 1

Author Comment

by:willywig
ID: 9859307
Thanks that is what I wanted to know :)
testn answered first so he gets the points...
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question