What does the following class declarations mean ?
internal class A { }
public class B { }
I am able to access both of them in another class in another assembly using the reference of the assembly having class A and B. What's the difference in internal and public access specifiers in terms of class?
Internal is only available within the assembly it resides in.
Public is available to any assembly referencing the one it resides in.
If you can access the internal class from another assembly you either have "InternalsVisibleTo" set up, or you're not referencing the class you think you are.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With