Recently I have been reading Q&A for the 70-483 Microsoft certification exam. Most of the questions are very simple, but some of them were actually hard to answer correctly. Anyway, one of the questions forced me to make a small research regarding how C# compiler concatenates strings. At first, I thought that the question is very easy and there is nothing special about that, but then I realized that I am not 100% confident with my answers, I will show you why.
Every time I google for covariance I end up reading Eric Lippert's blog. It has an awesome seria of articles about covariance and contravariance. It is very old, it was written in 2007, but still useful when you don't know how to explain the variance to somebody who doesn't know how it works for delegates or generic types.
- Covariance and Contravariance in C#, Part One
- Covariance and Contravariance in C#, Part Two: Array Covariance
- Covariance and Contravariance in C#, Part Three: Method Group Conversion Variance
- Covariance and Contravariance in C#, Part Four: Real Delegate Variance
Anyways, his blog is awesome, any developer can find something useful there.
On one of the job interviews I have been asked about ThreadPool, after my answer (which was 100% correct) interviewer decided to give me a small test.