Class library reference problem
Posted
by Anindya Chatterjee
on Stack Overflow
See other posts from Stack Overflow
or by Anindya Chatterjee
Published on 2010-06-13T16:40:47Z
Indexed on
2010/06/13
17:02 UTC
Read the original article
Hit count: 237
I am building a class library and using its default namespace as "System". There suppose I am creating a generic data structure say PriorityQueue and putting it under System.Collections.Generic namespace.
Now when I am referencing that library from another project, I can't see PriorityQueue under "System.Collections.Generic" namespace anymore. Though the library is referenced in that project I can not access any of the classes in it.
My question was mscorlib and System.dll share similar namespaces, but still classes from both the assembly is accessible, but why can't mine? If I put a public class under System.Collections.Generic namespace in my class library and refer that library in a project and use a statement like "using System.Collections.Generic", still why I can't access my class there?
This was an experimentation I did, I know using System namespace is not encouraged in custom class library, but I want to know the reason behind why I can't access my class in this special case?
Please someone shed some light on it.
PS: Last time I asked similar question but put it wrongly, so people got misunderstood and I didn't get my answer. This time I am trying to put it correctly as far as I can. Sorry for the misunderstanding.
© Stack Overflow or respective owner