Greg Beech's Website

Browse by Tags

  • Natural sort order of strings and files

    In Windows XP and Vista the algorithm used to sort files by name in Explorer does not simply compare the strings alphabetically, but has additional logic such as treating numeric characters as numbers. This means that a file named "20.txt" appears after "3.txt" in Explorer, even though alphabetically it would appear before it. The good news is that the algorithm used to do this...
    Filed under: , ,
  • Why do iterators have deferred execution semantics?

    After my post about deferred execution semantics and re-entrancy I've had a couple of people ask why iterator code has deferred execution semantics rather than just executing immediately. To understand this we need to see how iterators are actually implemented. Consider the following very simple iterator method which produces a range of integers: public static IEnumerable < int > Range( int...
    Filed under: , ,
Copyright (C) Greg Beech. All rights reserved.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems