Answer the question
In order to leave comments, you need to log in
How to make a hidden method visible to another assembly in C#?
I want to create a unit test for the method, so I need to make it open for the project with tests. But at the same time, I would like to leave it hidden for the rest. Is there a way to do this? I suspect there must be some attributes.
Answer the question
In order to leave comments, you need to log in
As an option, you can try to make an overloaded public method with directives
#if(DEBUG)
public string GetMyAwesomeString(string anotherOne){
return _getMyAwesomeString(anotherOne);
}
#endif
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question