• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

.NET dll question

Kntx

Platinum Member
Hey guys,

I'm working on a .NET dll over here and I have a question for those of you familliar with hiding methods.

Let's say I have a class named A. A has some methods. Various objects within the dll need to call said methods. As such, these methods should be public.

However, I do not want these methods to be visible to clients of the dll. How can this be achieved?
 
I'm not too familiar with .NET dll, but under VC++ methods won't be exported unless you explicitly export them. Is that not the case with .NET?
 
Originally posted by: Argo
I'm not too familiar with .NET dll, but under VC++ methods won't be exported unless you explicitly export them. Is that not the case with .NET?

Correct.
 
Originally posted by: MrChad
Originally posted by: Kntx
Originally posted by: MrChad
Make the methods protected.

Let's say I have a class named A. A has some methods. Various objects within the dll need to call said methods. As such, these methods should be public.

So make the other objects within the DLL friends of class A.

It's written in C#, there is no such thing as a friend class in C#.

What there is though, is an access modifier called internal... Which I guess I'll use. I was hoping there was an attribute that I could use to hide methods. Oh well.
 
Back
Top