It seems that any method called by a public static function has to be public as well…
If it’s a method that should really only be accessed from the same public static class, would using the “protected” keyword work?
It seems that any method called by a public static function has to be public as well…
If it’s a method that should really only be accessed from the same public static class, would using the “protected” keyword work?
I’m surprised this hasn’t been answered. Yes, protected works to limit code access within the class or derived classes. However, I personally like to use “protected internal” since it acts like an OR statement and allows my code to be accessed namespace wide.