troubleshooting Question

OO Process...references use - why not?

Avatar of davism
davismFlag for United States of America asked on
.NET ProgrammingC#Visual Basic.NET
4 Comments1 Solution519 ViewsLast Modified:
This has sorta hit me... and I'm not kinda started thinking and wondering.

Let's say I have an assembly that is a .DLL. So, we'll call it A.DLL.

To create A.DLL I have references to B.DLL and C.DLL. All of the .DLL's are in using a difference namespace. Let's say all the methods and everything are publically scoped in B.DLL and C.DLL like "Test" in C EXCEPT for those that are used internally in B.DLL or C.DLL and let's say they are private (restricted to the class.)

Now, I have assembly E.EXE and it is using the reference A.DLL.

Why cannot I not use and anything in C.DLL that are publically scoped?

I mean I am "using A;". But why can't I do something A.Test?

A has C in it but yet I cannot access C.

The only way is in the E.EXE I add a reference to C then I needing to add "using C;"

Then I can access Test. Not through A.Test but "Test".

If I have to do that they isn't C in the assembly twice? Once for the E.EXE and onces for the A.DLL?

What am I missing here because it seems duplicative?

Any information would be greatly appreciated.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros