In today’s post, I want to share a trick I discovered: using Stack Overflow to help answer my questions. Before you stop reading, I mean without posting my question at all. In fact, I simply rediscovered the time-honoured tradition of “rubber ducking”. I think Stack Overflow provides the perfect place to rubber duck and I’d like to share my reasoning.
Have you ever wanted to test the behaviour of a method, without making it part of your public API? Have you ever been forced to choose between compromising on the encapsulation of your business logic, and ensuring that it behaves as expected? Allow me to introduce the
InternalsVisibleTo attribute! In this post, we’ll look at what this lets you do, but we’ll also touch briefly on the debate surrounding its use.