vb.netrecursionnamespacespublic

vb.net external-only properties or methods


Is there a simple way in vb.net to mask a public property or method from the internal namespace? It would be helpful as a refactoring tool to isolate internal dependencies and perhaps to enforce a non-recursion policy for external services.


Solution

  • No. Any property or method that's usable from the external world is usable from your internal project as well, by definition.

    Some tools, such as Resharper, though, can simplify checking policies like this. For example, Resharper lets you view an entire list of call sites where a property or method is being used. You could use this to verify that nothing internal is using a specific method.