Use .NET Reflection with C# to call Private/Protected Methods

Some days ago I needed to write some tests for an old Windows Service. I was not authorized to make any changes in the Code of the Service (and its libraries), so in order to invoke some protected/private method I needed to use the reflection. What follows, is the code I used: nothing complicated, but … Continue reading Use .NET Reflection with C# to call Private/Protected Methods