Nested Types

Recently Michael Features blogged about nested types.  The title was almost “nested types considered harmful”. I don’t agree.  I don’t agree that they’re any more harmful than any other C# construct (except goto…).  Nested types are like anything else in our tool-belt: they have a time and place and can be abused. But, when to use them?  Well, for the most part I agree with Michael, you should avoid them. But, there are times when they’re simply the best solution in a given set of circumstances. Let’s look at asynchronous programming model (APM) in .NET.         // Paraphrased from … Continue reading Nested Types