Formalizing and extending C# type inference

Formalizing and extending C# type inference (pdf), Gavin Bierman

"Unfortunately this part of the published language specification is a little terse, and hence this feature can often behave in surprising ways for the programmer. Moreover, this process is quite different from the better known one implemented in Java 5.0. In this paper we attempt a formal reconstruction of the type inference process as it is currently implemented in C# 2.0."