.NET dll question

Kntx

Platinum Member
Dec 11, 2000
2,270
0
71
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?
 

Argo

Lifer
Apr 8, 2000
10,045
0
0
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?
 

Kntx

Platinum Member
Dec 11, 2000
2,270
0
71
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.
 

Kntx

Platinum Member
Dec 11, 2000
2,270
0
71
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.