This project is read-only.

Type inference on lamdas passed to methods

Topics: VB Language Design
Apr 21, 2014 at 1:58 AM
Today we are use linq functions like:
        Dim list = New List(Of Integer) From {1, 2, 3}
        Dim c = list.Where(Function(i) i > 2).Count
Could be nice to write:
        Dim c = list.Where(i > 2).Count
Variable i is undefined, so compiler should treat it as function parameter, with type acquired from list (Integer)