| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

LINQ

Page history last edited by Corey Alix 15 years, 1 month ago

About LINQ

Applies a SQL like syntax to .NET collections

 

LINQ Code Snippets

How many root folders contain a space:

                var lvInfo = new System.IO.DirectoryInfo("C:\\");

                var lvCollection = lvInfo.GetDirectories();
                var lvItems = from n in lvCollection where (0 < n.Name.IndexOf(' ')) select n.FullName;
                Console.WriteLine("{0} items contain a space", lvItems.Count());

 

Comments (0)

You don't have permission to comment on this page.