Is it possible for methods to have dual access modifiers?

155 views Asked by At

I have many methods that are defined internal like so:

internal static string GetAJobShaNaNaNaShaNaNaNaNaNa(string Silhouettes)

However, in order to call them from a test project added to the solution, I need to change their access modifier from internal to public.

Is there a non-tedious way to make these methods public to the tests, yet remain internal otherwise?

2

There are 2 answers

1
Daniel A. White On BEST ANSWER

Why not add InternalsVisibleTo in your assembly to allow the tests access?

[assembly:InternalsVisibleTo("YourTestAssembly")]
0
neo On