Christian Nagel's OneNotes

.NET Training, Consulting, Coaching - C#, Web Services, Enterprise Services, ASP.NET, Whidbey, Longhorn and More!

Sponsors

Affiliations

Books I've written

INETA UG Leaders

My Blogroll

Friend Assemblies

The C# access modifier internal defines access is only allowed within the assembly. This is what .NET 1.0 defined. With .NET 2.0 friend assemblies are allowed to access these members, too. Friend assemblies are defined with the attribute class InternalsVisibleToAttribute:

[assembly:InternalsVisibleTo ("AssemblyB, PublicKeyToken=32ab4ba45e0a69a1")]

Christian

Comments

TrackBack said:

Friend Assemblies .NET 2.0
# May 1, 2005 2:27 AM

Keith said:

This doesnt Work, you need  something like

[assembly:InternalsVisibleTo("FriendAssembly PublicKey=0024000004800000940000000602000000240000525341310004000001000100031d7b6f3abc16c7de526fd69ec2926fe68ed2f9901afbc5f1b6b428bf6cd9086021a0b78b76bc340dc6ab27b65e4a593fa0e60689ac98dd71a12238ca025751d135df7b98c5f9d09172f7b62dabdd302b2a1ae688731ff3fc7a6ab9e8cf39fb73c60667e1b071ef7da5838dc009ae0119a9cbff2c581fc0f2d966b77114b2c4")]

# January 6, 2008 12:58 PM

grand-gambler.com said:

Blin classics of the genre, I laughed heartily ...

# March 31, 2010 7:59 PM

telephone answering software for computer said:

When he works out of the football legal, trixie varies at the coast of his protective band.

# May 19, 2010 11:03 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)