Spot the Bug! – The Key to using Anonymous Types (Jonathan Aneja)

This one’s going to be long, but for those of you who’ve felt the first 3 in this series were too easy I promise this one’s tougher J.   Let’s say you want to list all the customers from a table in a ComboBox, and update the UI based on which one is selected.  To… Read more

VB 2008 Language Deep Dive – Presentation Materials (Jonathan Aneja)

Last week I got the chance to visit the Toronto .NET User Group and give a talk on all the great new language features in VB2008.  It was great to see so much excitement around LINQ and especially XML Literals!   The slides and demo code are posted at the link below; here’s the session… Read more

How LINQ to Dataset works in VB (Jonathan Aneja)

LINQ at its core requires any data source to be queryable, which basically means it must implement IEnumerable.  (It’s actually a bit more complicated than that, for a full explanation see section 11.21.2 of the Visual Basic 9.0 Language Specification).  Now when working with LINQ to Dataset we have a problem: DataTable does not implement… Read more

Using LINQ to Dataset in an .aspx page (Jonathan Aneja)

Recently I got a customer question about how to use LINQ to Dataset in an .aspx file.  The compiler was complaining that it couldn’t find the AsEnumerable method that allows LINQ to work over a DataTable (“AsEnumerable is not a member of ‘DataTable’”).  The code he sent looks correct, so why is the compiler not… Read more