Visual Basic programmers will learn how to write simple LINQ queries over objects by navigating files on the file system.
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.
Beth,
Thanks is Really useful the video, is simpliest and clear.