Welcome to WindowsClient.net | My Blog | Sign in | Join

Windows Client Videos

How Do I: Get Started with LINQ?

Visual Basic programmers will learn how to write simple LINQ queries over objects by navigating files on the file system.

Posted: Nov 19 2007, 07:39 AM by ttriguero | with 2 comment(s)
Filed under:

Comments

Shadders said:

Come on guys, Linq looks excellent but how about spending five minutes longer on the video to show how to perform the same in C#?

I can just about work out that the VB Linq query:

Dim files = file In My.Computer.FileSystem.GetFiles(CurDir()) OrderBy file Select file

Has the equivalent in C# as:

var files = from file in Directory.GetFiles(Application.ExecutablePath)

                       orderby file

                          select file;

That was a twenty-minute struggle for me. If you must show Linq examples in VB.Net fine, but have the courtesy to add the C# equivalent at the end please.

Thank you.

# February 24, 2009 5:24 PM

alexcruzlopez said:

Beth,

Thanks is Really useful the video, is simpliest and clear.

# April 29, 2009 10:04 PM