invisible classes outside the Class Library

  • Thread starter Thread starter buu
  • Start date Start date
B

buu

So, I have my class library that contains multiple classes, but I would like
to have only one of them to be visible outside the library...

how?
 
Just change the access modifier on the classes you don't want exposed to
internal instead of public.

public class MyClass {
}

Would become:

internal class MyClass {
}

If you're using VB, it'd be Friend instead of internal.
 
buu said:
So, I have my class library that contains multiple classes, but I would like
to have only one of them to be visible outside the library...

how?

Make the one you want to be visible public, and all the rest internal.
 
Back
Top