VB.NET Doesn't Have LINQ

Thursday, 03 January, 2019

Many years ago I was working with developers from an airline in Mexico, helping them implement the booking web application for their airline.

I don’t remember the actual business requirement that caused the question, but they had a List<T> full of somethings and they needed to filter it. I told them just to use the LINQ (language-integrated query) methods on the .NET collection objects.

The developer at the airline kept coming back for clarification. I knew they were using VB.NET, but I kept sending them C# snippets because when you’re making heavy use of libraries and method calls on objects the syntax isn’t much different. After a few rounds back and forth I figured it would be easier if I just wrote the VB code they needed so they could move on. So, I launched a new VB.NET project and started importing the libraries that the reservation system web application was built against. Eventually I got to the point where I could write the little method.

I started typing the C# syntax (like I had asked my customer to do). But the lambda method wouldn’t compile! I scratched my head and started googling “ lambda syntax” and I learned that VB.NET didn’t support that feature!! I guess VB has it now, but it didn’t back in 2011.

So, I wrote a straightforward method to filter the list and apologized for all the confusion.

That is an example of me believing my customer and working hard to understand their situation. Recognizing the difference between what he is experiencing and what I expect, and then taking measures to get my situation closer to theirs.