Linq-a-fi your file system by creating your own DSL

Posted by: Williams .Net Zone, on 19 Oct 2008 | View original | Bookmarked: 0 time(s)

Sample usage: Console.WriteLine("\nGet number of files and total size under a dir.");long totSize = 0;long totFiles = 0;var q = (from f in new LFileInfo(@"c:\temp").Children(true) let x = totSize += f.Length let y = totFiles++ select f); Console.WriteLine("Total Size:{0:N} Total Files: {1}", totSize, totFiles); // LFileInfo. Wraps a FileSystemInfo object to allow us to more simply "linq-a-fi" directory operations.using System;using System.Collections.Generic;using...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.

Similar Posts

  • VBA code I wrote this week in Excel and how it helped me more
  • Using T4 Templates for Simple DTOs more
  • How do I deploy an application and its prerequisites? (Mary Lee) more
  • IIS Search Engine Optimization (SEO) Toolkit Announcing Beta 2 more
  • The most common bead craft is jewellery more
  • Using VSTS to Quickly Test Scenarios with Add-In Applications more
  • How to retire (respectfully) legacy systems more
  • Silverlight: RadChart for Export to Image more
  • Dissecting Lucene.net storage: Documents and Fields more
  • Lucene.net: your first application more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD