Home All Groups Group Topic Archive Search About

How can I access internal classes from another assembly?

Author
2 Feb 2006 1:22 AM
theDoorMan
While working with Wintellect's Power Collections, I noticed that they have a
unit test assembly that accesses internal classes in their power collection
assembly. I thought the definition of "internal" was that you could not
access an internal class from another assembly (without using reflection as a
back door). I cannot find anything special that they have done, but cannot
duplicate it.  I must be missing something terribly simple about how
assemblies work.

Author
2 Feb 2006 8:40 AM
Mattias Sjögren
>I cannot find anything special that they have done, but cannot
>duplicate it.  I must be missing something terribly simple about how
>assemblies work.

As of v2.0 of the framework there's a InternalsVisibleTo attribute
that lets you do this.


Mattias

--
Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

AddThis Social Bookmark Button