Sign in to follow this  

[.net] [C#] internal, assembly and C++ friends

This topic is 3773 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm looking for the C# equivalent of a C++ friend class modifier. Apparently you can use the 'internal' keyword to implement unrestricted access within the same assembly, but what exactly is defined as an assembly? Does the code/classes have to be in the same file? Is the executable defined as a single assembly?

Share this post


Link to post
Share on other sites
Quote:
Original post by Rattenhirn
That's right. Assembly is a .dll or .exe file.

So then there is nothing that will allow a single class unrestricted access to another's members? Assuming that the classes are completely seperate and not related (inherited, etc) in any way.

Share this post


Link to post
Share on other sites

This topic is 3773 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this