Visual Studio 2010 Pre-Beta CTP is Now Live

Mentally Jumbled notes that Visual Studio 2010 Pre-Beta CTP is Now Live. Visual Studio 2010 and .NET Framework 4.0 mark the next generation of developer tools from Microsoft. Designed to address the latest needs of developers, Visual Studio delivers key innovations in the following pillars: Democratizing Application Lifecycle Management, Enabling emerging trends, Inspiring developer delight [...]

Share

Read Users' Comments (0)

How to Get a List of Installed Applications with LINQ

One of the powerful features of LINQ is that it can be used on any List<> or IENumerable collection. Retrieving a list of installed applications on a computer using the C# 2.0 method involves several lines of code (20 in the example below), while the LINQ method results in 10 lines of code (a 50% [...]

Share

Read Users' Comments (0)

How to Use SQL “Where In” with LINQ to SQL

While LINQ to SQL can sometimes look very much like standard SQL, there are many (sometimes subtle) differences. One of those differences is using a SQL "Where In" clause with LINQ to SQL. As an example, let's say we want to return a list of customers who live in UK, USA, or Australia. I'm using [...]

Share

Read Users' Comments (0)

How to Use LINQ SelectMany

Okay, everyone knows by now how simple LINQ queries with a where and select (and orderby, and Take and Skip and Sum, etc) are translated from a query comprehension into an equivalent expression for further translation: from p in products where p.Price > 100 select p.Name becomes products.Where(p => p.Price > 100).Select(p => p.Name) All [...]

Share

Read Users' Comments (0)

How to Use “Is Null” With LINQ to SQL

In SQL Server, a SQL statement like 'NULL=NULL' evaluates to false. however 'NULL IS NULL' evaluates to true. So, for NULL values in your database columns, you need to use the 'IS' operator instead of the regular '=' operator. The problem is, in Linq to SQL, there is no such 'IS' operator since 'IS' is [...]

Share

Read Users' Comments (0)

How to Use LINQ OfType

The LINQ OfType operator can be used to return objects of a certain type from an array. For example, if we have an array of objects which contains both strings and numbers, we can use the LINQ OfType operator to return only strings or only numbers LINQ OfType Example – Return Only Strings object[] goop [...]

Share

Read Users' Comments (0)